Appointments+ Not recognizing login status (JS)

Hi there,

We're setting up Appointments+ here, and we have the "require user to be logged in" setting checked, but when we try to click an open appointment time with any user account while logged in (any user role), we get a "You need to be logged in" popup alert.

I tested the plugins' login check by using the [app_schedule logged="Logged in!" notlogged="Not Logged in!"] shortcode, and the system echoes the correct string based on a user's login status.

I should mention we're also using Membership 2, and this page is locked to our one and only membership level. I've tried my appointment test with the page's Membership Access control enabled and disabled, with no change. I've also tried with Membership 2 disabled entirely.

I see no JS errors on my browser console, and no errors in my PHP logs, either.

Have enabled support access for you guys.

Thank you!

  • Nastia
    • Support Rock Star

    Hello @roundhouseguys, I hope you are well today!

    I'm sorry to hear you have this issue.

    Would you please update the Appoitments + plugin to the latest version and test again?

    In case ypu continue to have the same issue, please run a quick check for a conflict with a plugin/theme?

    Deactivate all other plugins and test again. If the issue is gone, please activate one plugin at the time to find out which one is causing this conflict.

    Please follow the flowchart from our manual:
    https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Let us know how it went!

    Cheers,
    Nastia

  • roundhouseguys
    • Site Builder, Child of Zeus

    Hey Nastia,

    The plugin didn't report any updates until I deactivated the WPMUDEV dashboard, but I was finally able to update it, but it didn't change anything. I've also already tried deactivating all of the plugins and reverting to the twentysixteen theme, but nothing has worked.

    Thank you.

  • Nastia
    • Support Rock Star

    Hello @roundhouseguys, I trust you are weel today!

    We're setting up Appointments+ here, and we have the "require user to be logged in" setting checked, but when we try to click an open appointment time with any user account while logged in (any user role), we get a "You need to be logged in" popup alert.

    I couldn't recreate this issue on your site, I created a user (subscriber role) logged in and booked the appointment without any issues. The pop up with "You need to be logged in" never appeared.

    Would you please confirm the same from your site as well?

    When using the [app_my_appointments] shortcode, the list is always empty!

    I have tested this on two different servers, On one of them, I could reproduce the same. I believe this is a server related issue.
    Please tell me what hosting provider are you using?

    Would you enable debugging mode and set the WP_DEBUG_LOG to true? Please put the following lines in the wp-config.php file:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    define( 'WP_DEBUG_LOG', true );

    Please book an appointment again with asubscriber role. Once you do this attached here the debug.log file. You will find the debug.log file in the following path
    .. /wp-content/debug.log

    Let us know how it went!

    Kind Regards,
    Nastia

  • roundhouseguys
    • Site Builder, Child of Zeus

    Hey Nastia,

    First off, "Require login" was UNCHECKED, so that we could continue our work in implementing the plugin, and my guess is it was left unchecked when you logged in and tried, unless you manually changed it to 'yes' and back to 'no' yourself. I've set it to 'yes' now, please try again. On multiple machines, we're all seeing the "must be logged in" popup.

    Regarding hosting, we self-host, and have our own VPS. This is the only site on this particular VPS, running Ubuntu 14.04 with Apache 2.4.7. I am the admin and have complete access.

    Otherwise, I followed your instructions, and no debug file is generated, as no errors have occurred, both with logins set to 'yes' or 'no.'

    Thanks.

  • Nastia
    • Support Rock Star

    Hello @roundhouseguys, I hope everything is well with you!

    I'm sorry for late reply!

    When I was troubleshooting your site I have changed the settings in the "Require login" option to compare the output result. Please accept my sincere apologies that I didn't change it back. I hope I didn't cause any inconvenience.

    Would you please re-grant access support, because the session has expired?

    Please tell what PHP version you are using on your server?

    Please advise,

    Kind Regards,
    Nastia

  • roundhouseguys
    • Site Builder, Child of Zeus

    Hey Nastia,

    No worries at all—PHP version is listed as PHP 5.5.31-2+deb.sury.org~trusty+1

    Support re-enabled.

    So sorry to add, but we're having another issue alongside this one! We're trying to set up multiple calendars with different appointment schedules (we have 3 different rooms, and are using Appointments+ to book space in each one—in other words, someone can book a time slot in one room, but the others should still show "available" unless a slot is reserved on that specific calendar). We're using services and locations to manage this, and are specifying service=1, 2, etc. in the shortcode.

    Thank you!!

  • roundhouseguys
    • Site Builder, Child of Zeus

    Hi again,

    Many days and no response.

    For what it's worth, we are happy to ignore the JavaScript 'log in' issue for now if we can get multiple calendars set up and working. That's really our main focus at this point, and the delay in support here is really killing us—we have a deadline to meet, and you've disappeared.

  • Sajid
    • DEV MAN’s Sidekick

    Hi @roundhouseguys,

    Hope you are doing good today :slight_smile:

    I tried to setup multiple monthly calendars on same page and its working just fine for me. You can see them here on my site > http://jwebsol.com/wpmu/sample-page/

    What issue you are exactly facing with multiple shortcodes ?

    At what page you are using the shortcodes ?

    Please keep the support staff access open in case I need to check the shortcodes and setup.

    Regarding delay in this thread, our system feeds us tickets from oldest to newest to ensure every one gets a response. These days we are getting high volume of tickets than usual. Its recommended always post one consolidated reply and wait for staff to respond. That's not excuse but explanation of how our system works.

    Please accept my sincere apologies for delay on this ticket and thanks for your patience.

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

  • roundhouseguys
    • Site Builder, Child of Zeus

    Hey Sajid,

    Thanks for your response and explanation—totally understand, and sorry for the repeat nudges.

    The 3 pages on which we're using the individual calendars are the following:

    http://the-lambs.org/clubhouse/rehearsal-rooms/ruth-rehearsal-room/
    http://the-lambs.org/clubhouse/rehearsal-rooms/card-room/
    http://the-lambs.org/clubhouse/rehearsal-rooms/performance-space/

    I'm using this shortcode:
    [app_schedule class="rhd-reservation-table" logged="Click on a free time slot to make your reservation." service="2"] (Changing service="2" to 1 or 3 for the other pages, and I've tried using quotation marks and without in the shortcode, but nothing changed)

    When I make a reservation on one of the calendars, the other calendars show the time slot as reserved, but they should all have totally independent time schedules.

    I've renewed support logins, so please have at it. Thank you!

    Cheers,
    Nick

  • Sajid
    • DEV MAN’s Sidekick

    Hi Nick,

    Hope you are doing good today :slight_smile:

    Thanks for granting support staff access and also explaining the issue.

    I can see that you don't have any service providers added or assigned to any of your service as seen in attached screenshot.

    By default Appointments + consider the administrator user as a service provider.

    Also, you have only one capacity for each service.

    So in this scenario, you have one service provider that can only mange one appointment at one time. That's the sole reason when you book service it marked all other slots for same time as booked.

    To fix this issue, you either need to add service providers for each service from Appointments > Settings > Service Providers or Increase the capacity.

    If you are only service provider then you can add two more users and make them dummy service provider. By making them dummy means you will receive the notification of each service but this will also let Appointments+ spare same time slot for each service.

    Hope that helps! If you still need further assistance, please don't hesitate to ask, happy to help :slight_smile:

    Cheers, Sajid

  • roundhouseguys
    • Site Builder, Child of Zeus

    Sajid,

    Worked like a charm!! Thank you so much for your help!!

    Now that we're working there, the only remaining problem is the initial "you must be logged in" issue, where logged-in users try to select an appointment slot but still get the "you must be logged in" popup alert.

    Thank you again!!

  • Sajid
    • DEV MAN’s Sidekick

    Hi @roundhouseguys

    Hope you are doing good today :slight_smile:

    I am glad to know things are working fine for you now. For login JS issue would you mind sharing the exact page link here, where you are getting issues and also grant support staff access so I can take a closer look.

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • roundhouseguys
    • Site Builder, Child of Zeus

    Hey again Sajid,

    We've been chatting a lot recently! Thank you for all your help.

    Great news on this one—it started working! Not sure what changed, but we changed up our templates a little bit, and whatever conflict was happening seems to have been resolved. All good.

    Thank you again!

    Cheers,
    Nick (and Roundhouse Designs)

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.