Help Desk

Previous and next week view links giving 404

  • Posts: 25 Topics: 6
    | Permalink

    I’m having the same issue as the person in the below thread. The next and previous URLs result in a 404. I have done the conflict test and found that in the 2016 theme the events calendar is using AJAX to switch the calendar and changing the URL vis javascript. However if I navigate directly to the URL still using the 2016 theme i get a 404. There is an issue with the plugin as this has worked before. Please advise ASAP.

    ========================
    PLEASE LEAVE FOR SUPPORT
    Reporting the same issue as: https://theeventscalendar.com/support/forums/topic/404-issue-in-week-view-trying-to-view-next-week/

    Posts: 5926
    | Permalink

    Hi Karen,

    Thanks so much for reaching out!

    It seems that there are no events on the site you linked to, so I can’t see things in action.  However, as a first step, could you try unchecking “Use Javascript to control date filtering” under Events Settings < General?

    Let me know how that goes!

     

    Thanks,

    Jaime

    Posts: 25 Topics: 6
    | Permalink

    That checkbox is already unchecked. As I said, this worked before. You can see it here http://canalside.staging.wpengine.com/things-to-do/week/.

    Posts: 5926
    | Permalink

    Hi Karen,

    As a next step, can you try flushing your permalinks by going to Settings > Permalinks, and clicking Save Changes.  Also, what permalink structure are you using?  Have you made any changes to this structure?

    Here is more information on permalinks, which may help point you in the right direction:

    https://theeventscalendar.com/knowledgebase/permalinks-best-practices/

    In addition, you may want to test if this works without customizations.  I noticed that you have your Next and Previous links on top of the calendar, which is not the default.  Try temporarily removing these customizations and see if it works.

    If you are still having issues, you may want to try running through the steps outlined here:

    https://theeventscalendar.com/knowledgebase/fixing-http-404-errors/

    Let me know how it goes!

     

    Thanks,

    Jaime

    Posts: 25 Topics: 6
    | Permalink

    I have gone through all these steps already. Flushing the permalinks was my first thought, didn’t do anything. THe permalink structure I’m using is post name.

    I have changed the site to use the twentysixteen theme. As I stated in my original post, the ajax functionality works, even though I have that unchecked. It seems that that plugin JavaScript is changing the URL. When that happens, try reloading the page with the a future week starting date, it gives a page not found error.

    Posts: 5926
    | Permalink

    Hi Karen,

    It looks like your Events Slug and your Single Events Slug are the same, which may be the source of the issue.  Can you try changing your slugs so that they are different, then reset your permalinks and test if the issue still occurs?  You can do this by going to Events Settings < General and Save Changes.

    Let me know how it goes!

     

    Thanks,

    Jaime

    Posts: 25 Topics: 6
    | Permalink

    Changing the single slug allowed it to work, however I want both of them to be the same. This was never an issue before, why is it now?

    Posts: 5926
    | Permalink

    Hi Karen,

    I’m glad that we were able to find the root of the issue!  I’m not sure why this worked for you before, because it shouldn’t by default.  If both slugs are the same, then they would redirect to the same page, which isn’t really possible.

    Let me know if you have any other questions!

     

    Thanks,

    Jaime

    Posts: 25 Topics: 6
    | Permalink

    But the issue is that it worked before and this site has been up for years. If I changed it, I would have to create bunch of 301 redirects. My issues is also not resolved becuase I want and need the slugs to be the same. How would it redirect to the same page? Can’t the plugin tell what is a single post vs an archive page? It’s just a CPT. I know the week view has /week, but but all of the single views should be able to use the same slug.

    Posts: 5926
    | Permalink

    Hi Karen,

    I did some additional testing on my site and it seems that it can work with both slugs being the same thing.  So you can change it back to the way it was (if you want) and see if the issue still occurs.

    If it still occurs, flush your permalinks and you may also want to purge your cache.

    If it still occurs then, let’s try to rule out if there is some type of conflict at play.
    This is usually because of:

    1.    A conflict with another plugin

    2.    A conflict with your WordPress theme

    3.    A template customization for the Events Calendar that requires updating

    When it comes to that type of issue, it is preferable to troubleshoot in a staging environment if you have one.

    A first quick test is to simply temporarily revert back to a default WordPress theme such as twenty-sixteen to see if the issue persists.

    The next step would be to go through our testing for conflicts procedure and let us know what you find out.

    Basically the goal here is to revert back to a bare WordPress installation to see if the problem persists. It also allows us to pinpoint what the cause of the issue is.

    But, before you do that, there are 2 things I would advise:

    1.    Make a backup of your database

    2.    Consider activating a “Maintenance Page” plugin if you are doing this on your live site (to minimize impact on your visitors)

    Let me know how that goes!

     

    Thanks,

    Jaime

    Posts: 25 Topics: 6
    | Permalink

    I have done all of this and stated this in a previous comment. As I have also stated, this worked before and there have been no changed on our end with the site. I am the theme developer and I followed the customization process that is outlined on your site. If I had to guess, something changed with how the plugin is creating re-writes.

    As I stated before, when I reverted back to a bare bone WordPress theme, the week pagination worked, however it only worked with JavaScript. If I went directly to a URL with a specific starting date for a week, still using the bare bone (twentysixteen) theme, it did not work. I have followed all of the troubleshooting step that are outline on the tribe site and have stated that. To be honest, I’m getting frustrated that you are just recommending that I keep doing the things that I have already told you I have done.

    If you would like, I can provide WordPress and FTP access to the staging site. Please advise.

    Posts: 5926
    | Permalink

    Hi Karen,

    I’m sorry to hear that you are still experiencing this issue!  Unfortunately we cannot log in to your site per our Support Policy, but I will do my best to assist you here.

    So just to clarify, the issue is that when you reload a week view page with a specific week, you get a 404.  I see this happening on your site, though I am unable to replicate the issue on my test site.

    As we’ve previously determined, changing the slugs does allow the functionality to work properly, but you would rather not go this route.

    Can you please enable WP_DEBUG and WP_DEBUG_LOG and share any debug messages you see?

    Also, can you update your WordPress version and Events Calendar related plugins to the most recent versions and see if the issue is still there?

    I briefly mentioned this earlier, but what are you using to display the Previous and Next links both above and below the calendar?  You may want to remove the customization and test without it.

    Let me know how it goes!

     

    Thanks,

    Jaime

    Posts: 25 Topics: 6
    | Permalink

    I have updated all plugins and WordPress and I still have the same issue. I turned on WP_DEBUG AND WP_DEBUG_LOG. Turning on WP_DEBUG shows these two errors:

    Notice: /nas/content/staging/canalside/wp-content/plugins/the-events-calendar/src/deprecated/TribeEvents.php is deprecated since version 3.10! Use Tribe__Events__Main instead. in /nas/content/staging/canalside/wp-includes/functions.php on line 3966

    Notice: /nas/content/staging/canalside/wp-content/plugins/the-events-calendar/src/deprecated/Tribe_Template_Factory.php is deprecated since version 3.10! Use Tribe__Events__Template_Factory instead. in /nas/content/staging/canalside/wp-includes/functions.php on line 3966

    I would like to point out that the theme that is currently being used while figuring this out is twentysixteen, so none f my custom code from my theme is being used. This also means all Tribe Event templates are being used from the plugin.

    Posts: 5926
    | Permalink

    Hi Karen,

    Thanks for sharing your error log.  These errors messages indicate that something on your site is using older pieces of code from our plugin.

    Is it possible some custom code, your theme or another plugin on your site is interacting with The Events Calendar and is perhaps in need of an update?

    In addition, another user had a similar issue and their code fix is in this forum post:

    https://theeventscalendar.com/support/forums/topic/same-issue-as-code-deprecated-in-functions-php/

    If this doesn’t resolve the issue, can you also send me an updated version of your system information in a private reply using the instructions found in the following link?

    https://theeventscalendar.com/knowledgebase/sharing-sys-info/

    Let me know how it goes!

     

    Thanks,

    Jaime

    Posts: 25 Topics: 6
    | Permalink
    This reply has been marked as private.
    Posts: 25 Topics: 6
    | Permalink

    I’m also seeing these errors in the admin section

    Notice: /nas/content/staging/canalside/wp-content/plugins/the-events-calendar/src/deprecated/TribeEvents.php is deprecated since version 3.10! Use Tribe__Events__Main instead. in /nas/content/staging/canalside/wp-includes/functions.php on line 3966

    Notice: /nas/content/staging/canalside/wp-content/plugins/the-events-calendar/src/deprecated/Tribe_Template_Factory.php is deprecated since version 3.10! Use Tribe__Events__Template_Factory instead. in /nas/content/staging/canalside/wp-includes/functions.php on line 3966

    Notice: /nas/content/staging/canalside/wp-content/plugins/the-events-calendar/src/deprecated/TribeEventsAPI.php is deprecated since version 3.10! Use Tribe__Events__API instead. in /nas/content/staging/canalside/wp-includes/functions.php on line 3966

    This tells me that it’s not a theme issue.

    Posts: 5926
    | Permalink

    Hi Karen,

    Okay, I understand.  Have you made any changes to the plugin code itself?

    In addition, it seems that you don’t have what day the week starts on set in WordPress (or it just isn’t showing up in your system information).  Can you reset this settings in Settings > General?

    As always, let me know how it goes!

     

    Thanks,

    Jaime

    Posts: 25 Topics: 6
    | Permalink

    No changed to the plugin code. The “Week Starts On” is set to Sunday. Still getting a 404. I have also fully deleted The Events Calendar and The Events Calendar Pro plugins and replaced them with freshly downloaded versions and I’m still getting the same errors.

    Posts: 5926
    | Permalink

    Hi Karen,

    I’m sorry that you are still getting these errors.  Unfortunately I have not been able to replicate this issue on my local site, so let’s keep troubleshooting here.

    I know that you have already checked the issue with a default theme, and it seems that we have ruled out the theme as an issue.  I do see a number of plugins that do have the potential to interact with our plugins, so I think an important next step would be for you to run through the full testing for conflicts procedure, so that only our plugin and a default theme are in place.

    Once there, I’d recommend flushing your permalinks and checking if you still get the 404s.

    Please let me know if you have any other questions along the way!

     

    Thanks,

    Jaime

    Posts: 25 Topics: 6
    | Permalink

    I deactivated all plugins, cleared the permalink cache and I’m still getting 404s. I have determined that the following PHP errors are coming from the “The Events Calendar: Agenda View” plugin. Deactivating that removes the errors. There is not update for that plugin. How do I resolve that?

    Notice: /nas/content/staging/canalside/wp-content/plugins/the-events-calendar/src/deprecated/TribeEvents.php is deprecated since version 3.10! Use Tribe__Events__Main instead. in /nas/content/staging/canalside/wp-includes/functions.php on line 3966

    Notice: /nas/content/staging/canalside/wp-content/plugins/the-events-calendar/src/deprecated/Tribe_Template_Factory.php is deprecated since version 3.10! Use Tribe__Events__Template_Factory instead. in /nas/content/staging/canalside/wp-includes/functions.php on line 3966

    I’m concerned that this is still happening on a default theme without any plugin except for the tribe plugins (The Events Calendar, The Events Calendar Pro).

    Would it be helpful if I package up the site and database so you can install on your end?

    Posts: 5926
    | Permalink

    Hi Karen,

    I’m glad to hear that you have found the source of the issue.  The Agenda View plugin was created as an example of how to set up our plugin.  However it is no longer maintained and will not be updated, so unfortunately I cannot provide support for that plugin.

    Since you have found the source of the issue, it is not necessary for us to see a database of your site.  Do you still need the functionality provided by that plugin for your site?  If it is possible for you to migrate that functionality to The Events Calendar and The Events Calendar PRO, that would be an ideal scenario.

    Let me know how that goes and if you have any other questions!

     

    Thanks,

    Jaime

    Posts: 25 Topics: 6
    | Permalink

    I didn’t find the source of the issue. I just found the source of the PHP error messages. I’m still getting the 404 page which is the main issues. I’ll address the issues with the agenda view once the 404 issue is resolved.

    Posts: 5926
    | Permalink

    Hi Karen,

    Just to clarify, with Agenda View disabled, you are still getting the 404 errors, correct?

    I think that it is worth it to address the Agenda View issue now, as it may also be causing other issues that you are unable to isolate.

    At this point, the options that I see are that you can either change the slugs, as we know that this works to resolve the issue.  Or you can try settings things up on a fresh WordPress install in order to get things up and running again.

    Let me know your thoughts!

     

    Thanks,

    Jaime

    Posts: 25 Topics: 6
    | Permalink

    Changing the slugs is not an option. This used to work flawlessly using the same slug. It makes no sense that it would just stop working. I’m also not the only one reporting this issue.

    Posts: 5926
    | Permalink

    Hi Karen,

    I apologize for the inconvenience that this issue has caused.  Your issue is specific to your site, and I personally am not seeing this issue as a trend among users.  Would you be willing to try a fresh WordPress install and seeing if the issue can be resolved that way?

    Let me know!

     

    Thanks,

    Jaime

    Posts: 65
    | Permalink

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    | Permalink

The topic ‘Previous and next week view links giving 404’ is closed to new replies.