Appointments form not loading and a lot of error message after upgrade to version 2

Hello,

Since I've updated Appointments+ to version 2, I get a lot of error message when I first load the appointments page:
Notice: Undefined offset: 1 in /customers/2/1/e/bore-outcoach.be/httpd.www/wp-content/plugins/appointments/includes/shortcodes/class-app-shortcode-services.php on line 282 Notice: Array to string conversion in /customers/2/1/e/bore-outcoach.be/httpd.www/wp-content/plugins/appointments/includes/class-app-worker.php on line 1063

After a refresh all but one error messages disappear:
Notice: Undefined offset: 1 in /customers/2/1/e/bore-outcoach.be/httpd.www/wp-content/plugins/appointments/includes/shortcodes/class-app-shortcode-services.php on line 282

When I try to make an appointment the form is not loaded. The wheel just keeps turning.
I've granted you access via WPMU DEV Dashboard and left message their as well.

Can you please take a look?

Kind regards,
Bart

    Dimitris

    Hey there Bart,

    hope you're doing good and thanks for reaching us!

    Since I've updated Appointments+ to version 2, I get a lot of error message when I first load the appointments page:

    Could you please try the hotfix provided in next link?
    https://premium.wpmudev.org/forums/topic/i-updated-appointments-today-and-now-my-calendar-is-a-mess#post-1197060
    Just keep a local backup of the altered file so you could restore it back in case of any other issue that may occur.

    When I try to make an appointment the form is not loaded. The wheel just keeps turning.

    I just saw that in action and no console errors came up.
    Was that working before updating?

    Could you please perform a plugin/theme conflict test as described in a nice flow chart here?
    https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/
    (just scroll down to see the image)

    If this comes down to nothing, please enable WP_DEBUG to check if there's any additional info there. Simply access your server through FTP, edit the wp-config.php file, find a line like
    define('WP_DEBUG', false);
    and replace it with the following (if the above line doesn’t exist, simply insert next snippet just above the /* That's all, stop editing! Happy blogging. */ comment)

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set('display_errors', 0);

    Then go ahead and try to replicate the error by trying to book a new appointment.
    By doing so, a /wp-content/debug.log file should be created.
    Simply download it, rename it to debug.txt and attach it here in your next reply.

    Warm regards,
    Dimitris

    Adam Czajczyk

    Hello Bart!

    Thank you for confirming the hot fix and for letting us know about conflicting plugin.

    The "debug.log" unfortunately doesn't seem to contain any relevant errors/warnings. I have just installed the "WooCommerce PDF Invoices & Packing Slips" on my test site also and checked it but I wasn't able to replicate the issue. While the conflict test usually reveals the main culprit quite precisely, it's also possible that it's a matter of "joint issues" rather than only a single theme.

    I noticed that you are using Jupiter theme which is a premium theme that I do not have access to. I was testing it with no other plugins active than only WooCommerce, WooCommerce PDF Invoices & Packing Slips, Appointments+ and WPMU DEV Dashboard and the Twenty Sixteen theme. Could you please try that exact set (including clearing out and disabling cache on site) and see if the form loads?

    If it does, then please enable your theme back and see if anything changed.

    Let me know about results, please.

    Kind regards,
    Adam

    Bart

    Hi,

    There was a debugging option enabled in WooCommerce PDF Invoices & Packing Slips plugin that was causing this issue. Disabling resolved the issue. But the error lines in the log remain.

    Since the update a client can also make an appointment during break hours. Both the default service provider and the main service provider are having the same break hours enabled. Maybe related to the error lines in the log?
    Can you take a look?

    Greetings,
    Bart

    Dimitris

    Hello Bart

    There was a debugging option enabled in WooCommerce PDF Invoices & Packing Slips plugin that was causing this issue. Disabling resolved the issue. But the error lines in the log remain.

    I'm glad that you resolved that!
    Are you referring to the initial errors mentioned here?
    I thought those were being dealt with the hotfix I provided in my initial reply here.
    Please advise!

    Since the update a client can also make an appointment during break hours. Both the default service provider and the main service provider are having the same break hours enabled. Maybe related to the error lines in the log?
    Can you take a look?

    This is a bug already reported to us. This is going to be addressed soon and included in next plugin release most probably. Either way, I connected this thread with our internal bug tracking, so we'll be able to notify you as soon as there's a development on this. Your patience is highly appreciated here!

    Warm regards,
    Dimitris

    Adam Czajczyk

    Hello Bart!

    Did you apply any other changes described in this thread in addition to this particular file from this post?:

    https://premium.wpmudev.org/forums/topic/i-updated-appointments-today-and-now-my-calendar-is-a-mess#post-1197060

    Where there also other custom/beta changes applied to the plugin? I tested that on my end with default Appointments install and the calendar seems to be properly fetching "first day" from WordPress settings. I'm asking because I'd like to make sure that I'm testing that in a version/configuration that you are using currently, so please let me know.

    Best regards,
    Adam

    Dimitris

    Hey there Bart,

    hope you're doing good today!

    Considering the break hours issue, could you please apply the hotfix provided by my colleague Panos here?
    https://premium.wpmudev.org/forums/topic/clients-are-able-to-make-appointments-during-a-scheduled-break-time#post-1206593
    This is already pushed in plugin's repository and it will be included in next plugin release, so worries after updating here.

    I have also setup a fresh (local) Wordpress installation with Appointments as the only plugin. Wordpress' first day of the week is monday, yet the calendar gives sunday as the first day.

    I can confirm that in my end indeed and I had another colleague of mine to double confirm that. It seems there's a bug in there and I already reported that to our dev team. This is going to be addressed soon along with other issues concerning Appointments calendar view and will be included in next plugin release. I really can't provide any kind of ETA about this, just keep an eye for new plugin updates in the future as its changelog should provide all fixes and additions.
    As a workaround now, you could try to select the next day instead, so if you want the calendar to start from Monday, try to set Tuesday as the starting week day in Settings -> General

    Warm regards,
    Dimitris

    Bart

    Hi,

    I have installed the update that was released today. The first day of the week problem is solved. Thanks for that!

    The issues with break hours and even with exceptions are not solved.

    This plugin is used for creating appointments with one provider only. Why does a client need to explicitly confirm that his provider is this one person in order to get the correct calendar (with the correct exceptions)? At first it shows the exceptions of 'no specific provider'. When a client clicks on an empty slot, the appointment is made with that one provider who has an exception for that day. Isn't it possible to show the correct calendar from the beginning without confirming any provider?

    Break hours are not taken into account, nor with no service provider selected, nor with one selected.

    Greetings,
    Bart

    Adam Czajczyk

    Hello Bart!

    I have installed the update that was released today. The first day of the week problem is solved. Thanks for that!

    Thank you for confirmation that it works for you for the week starting days. As for the other issues, let me ask one of the developers about that fix. I can see an information in our internal system that it's a complete fix but I may be missing something so let me make sure. I'll let you know when I got a confirmation (or explanation).

    Best regards,
    Adam