Home › Forums › Calendar Products › Events Calendar PRO › Calendar does not load when clicking on the link for the next month
- This topic has 9 replies, 3 voices, and was last updated 9 years, 3 months ago by
Cliff.
-
AuthorPosts
-
January 26, 2017 at 10:55 am #1224543
Michael McFann
ParticipantThis was originally under this topic “Calendar not loading for some users” that I closed.
Issue: when a user is in the monthly view on the calendar and they click on the link to take them to the next month, the page just hangs.
Things we have discovered:
* does not impact users with “Admin” role
* does not impact users if they are NOT logged on – as soon as they log in, the issue occurs
* can manually enter URL https://… /calendar/2017-02/ and the correct calendar page is displayed
* when an admin uses the link and goes to the next page, the URL for the page is displayed as https://…/calendar/2017-02/?undefined=%09%09%09%09%09%09%09%09Month%09%09%09%09%09%09%09&tribe-bar-date=2017-02Any ideas what might be going on? It almost seems like it is trying to access some resource that only an Admin can get to.
Thanks – Michael
January 26, 2017 at 3:32 pm #1224776Cliff
MemberHi, Michael. Sorry you’re experiencing this, and thanks for your detailed question.
This is an interesting one but isn’t currently a known issue so I’d suggest following these recommended troubleshooting steps for your own site:
There might be some new updates available. Could you please make sure all your Modern Tribe plugins (and WordPress core) are at their latest versions?
- Downloads / Version Numbers
- License Keys
- TEC Automatic Updates
- or TEC Manual Updates
- WordPress core updates
Once you verify you’re on the latest versions, please test to see if the issue is still happening for you.
If it is, please follow our Testing for Conflicts Guide (basically switch to Twenty Sixteen theme and deactivate all plugins and custom code other than Modern Tribe plugins) and see if that helps narrow down the cause of this.
If it doesn’t, please enable WP_DEBUG and WP_DEBUG_LOG and share any debug messages you see while changing tickets quantity, navigating your site’s home page, events page, single-event pages, and any other of your site’s pages relevant to this ticket.
Then, please share your System Information (while in Testing for Conflicts Mode). That will give me a lot of extra information to help diagnose the problem.
You might also see if you can spot any console errors at your site. (If needed, you may reference our KB article Using Google Chrome Developer Tools.)
Let us know what you find out.
Thanks.
January 27, 2017 at 3:36 pm #1225494Michael McFann
ParticipantThis reply is private.
January 28, 2017 at 12:21 pm #1225683Cliff
Membermtec-system-info.log and http://www.bayeast.org-js-console.log were not readable on my computer.
tribe-log-2017-01-27 was a blank file
Looking at your PHP_error_log and wp-debug.log files, I would recommend the following:
Do not use force_ssl_login().
The my_welcome and/or Wpsqt_Top_Widget widget(s) are throwing errors. Deactivate those.
These plugins are causing errors and therefore should be deactivated (or you might try updating them if you’re not using the latest version):
- HTTP-User-Sync
- be_videos
- contexture-page-security
- wp-migrate-db
- daves-wordpress-live-search
If deactivating all those still doesn’t resolve the issue, then, as stated in my previous reply, please follow the Testing for Conflicts guide. We know this can be challenging or frustrating but we cannot guarantee compatibility with all plugins and themes out there, especially ones that throw WP_DEBUG, PHP, and/or console errors.
January 30, 2017 at 2:05 pm #1226448Michael McFann
ParticipantThanks Cliff.
I’ve located the offending code. It was contained inside of my themes function.php file and was added there for the purpose of restricting the subscriber and bbp_participant roles from being able to access the WP Admin portion of the site.
function redirect_non_admin_from_wp_admin_dashboard() { $user = wp_get_current_user(); $disallowed_roles = array('subscriber', 'bbp_participant'); if( array_intersect($disallowed_roles, $user->roles ) && $_SERVER['PHP_SELF'] != '/wp-admin/admin-ajax.php' ) { wp_redirect( home_url() ); } } add_action( 'admin_init', 'redirect_non_admin_from_wp_admin_dashboard', 1 );Strangely, this code does not appear to break the calendar when running in my local development environment, just our staging and production environments.
Do you or anyone on your team know how I can update this code snippet so it does not confuse the Event Calendar admin-ajax.php requests with someone attempting to view the WP admin dashboard?
Thanks for your help!
-
This reply was modified 9 years, 3 months ago by
Michael McFann. Reason: Forgot some helpful information
January 30, 2017 at 2:25 pm #1226468Michael McFann
Participant302 redirect issues caused by above code on staging and production, but not on my local machine.
January 30, 2017 at 7:09 pm #1226594Cliff
MemberHere’s the feedback from one of our developers:
The difference might be that your local dev $_SERVER[‘PHP_SELF’] is being set to the expected value but in production/staging it is not.
You might want to revise your test where you check to see if it is an admin ajax request. Instead of $_SERVER[‘PHP_SELF’] != ‘/wp-admin/admin-ajax.php’, you should maybe have a conditional at the top of the function along these lines:
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { return; }Please let me know how this goes for you.
January 31, 2017 at 11:00 am #1227035Michael McFann
ParticipantThat makes total sense and seems to have worked. ]
Thanks so much for your help!
January 31, 2017 at 8:25 pm #1227317Cliff
MemberI’m glad to hear that!
Thanks for letting us know.
Have a great rest of your week.
-
AuthorPosts
- The topic ‘Calendar does not load when clicking on the link for the next month’ is closed to new replies.
