Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still able to book unavailable slots #465

Closed
smileBeda opened this issue Nov 14, 2023 · 9 comments
Closed

Still able to book unavailable slots #465

smileBeda opened this issue Nov 14, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@smileBeda
Copy link

I have setup 2 calendars (a target and a source to check against).
I have selected the weekly template and setup slots.

I added a meeting in my source calendar during one of the slots - this meeting has NOT been added by the appointments app of course. It is an event I will attend personally with my family, so I add it manually to my source calendar.

I can still book an appointment using the Appointments app even if the time is already used up by my event in the source calendar.

If instead I book something through the app, then that slot is unavailable after.

So it becomes impossible to make sure no one books when I am not available. I would have to edit the Target Calendar Template every time?
This makes is cumbersome.

Am I missing something? It says "check these calendars for conflicts" and I selected my source calendar there. Yet it appears to only check for events created by the app, not any other event.

@SergeyMosin
Copy link
Owner

Can you send me (sergey [at] srgdev.com) your settings dump Appointments Settings > Advanced Settings > Debugging > Settings Dump and the .ics file for the event that is supposed block the time slot, so I can try to replicate this on my testing machine.

@smileBeda
Copy link
Author

@SergeyMosin - thanks, email sent. In further testing, it appears it is a specific type of event: added by calendly to my Mac calendar, which then was imported to the nextcloud calendar:

  • use Mac Calendar for years
  • have calendly add events to it through the online calendly app
  • finally export Mac calendar with all events in it
  • import these to nextcloud

So technically the event is a Mac Calendar event but it was originally added to it by calendly. Maybe that is an issue, since it appears to work on other eventsI had added manually to my Mac calendar.

I do, however, have one more issue, which results in countless JS errors on the front end:
Uncaught ReferenceError: OC is not defined
at index.js:25:15
Uncaught ReferenceError: OC is not defined
at en_GB.js?v=188445fb-17:1:1
Uncaught ReferenceError: jQuery is not defined
at script.js?v=188445fb-17:492:12
etc etc

This happens when I simply load the Appointments URL in a logged out front end.
Additionally, when booking, it does send me the email, it adds the event, but it never stops spinning in the front end, effectively leaving the user there believing it "did not work".

It appears to me the whole of jQuery is missing, somehow, but I wouldn't know why or how to fix this (well, I would know in a "normal" website, but I assume if jQuery is required it would be loaded in a no-conflict mode already by the plugin?)

Please let me know if you need me to open a new issue for this.

@SergeyMosin
Copy link
Owner

Thanks sending the Settings Dump and the .ics file. It looks like your event class is set to private ( CLASS:PRIVATE ) and PRIVATE events are ignored for security purposes, relevant code here:

if ((!$all_day_block && !$evt->DTSTART->hasTime()) ||
// Classes in NC:
// PRIVATE = when shared hide this event (not checked here)
// CONFIDENTIAL = when shared show when busy
// PUBLIC = when shared show full event
(isset($evt->CLASS) && $evt->CLASS->getValue() === 'PRIVATE')) {
$vo->destroy();
continue;
}

Different calendar apps call the CLASS property by different names, for example in NC it is called When shared ...

image


Uncaught ReferenceError: OC is not defined

Some of the "heavy" NC JS files are taken out of the appointments Booking Page for faster page loads. The appointment form does not depend on the OC object or jQ

when booking, it does send me the email, it adds the event, but it never stops spinning in the front end,

It looks like the request does get sent to the back-end but then it get stuck there (maybe waiting for the mail server connection). Is there anything in NC logs ? If you have "Email Me when appointment is booked" option enabled the email should be sent or an error with more info is logged. Is an email sent to attendee ? In any case, I'll try replicate this.

@smileBeda
Copy link
Author

I am sorry the delay here.

While I get the point of the (external) meeting "not working" for the reason you mention, I still cannot get the online booking form to work.

  1. There are are about 18 jQuery errors showing up when clicking the button to book
  2. The most breaking is clearly this error: form:1 Refused to send form data to 'https://site.tld/index.php/apps/appointments/pub/EvxC6uyBMFZg6dSaMA%3D%3D/form' because it violates the following Content Security Policy directive: "form-action 'self' https://site.tld".
  3. The event is created, the emails are sent, but the form never stops spinning, gives no "success" feedback, or, if set, redirect to any target also fails to trigger.

Basically the prospect will think it "did not work"

I do not have any related errors that appear either right while or after booking an appointment.

The refusal to send data to me seems pretty much blocking - if it refuses, it also cannot receive any success, I suppose.

@SergeyMosin
Copy link
Owner

Can you email me the URL of the page so I can try to book one test appointment

@smileBeda
Copy link
Author

Sent the email with the publicly accessible booking form. Thank you!

@smileBeda
Copy link
Author

Heya! Are there any fixes (available) or updates (planned) for this issue?
I would really like to move away from calendly sooner or later.

@SergeyMosin
Copy link
Owner

Bug confirmed.

Combination of "Skip Validations Step" and "Redirect Confirmed URL" settings related to CSP. Chrome (Firefox is not effected for some reason) does not want to do a redirect to a different (sub)domain in the same call as from data submission

@SergeyMosin SergeyMosin added the bug Something isn't working label Apr 13, 2024
SergeyMosin added a commit that referenced this issue Jul 28, 2024
@SergeyMosin
Copy link
Owner

Fixed in v2.1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants