• Resolved jayseventwo

    (@jayseventwo)


    Hi, love this plugin but am having some issues. I have installed Sugar Events Calendar Lite and when i click on a link for an event it goes to a 404. When i disable your plugin all works fine (after saving permalinks).

    I have this plugin turned on in global settings and have added “mysite.com/whats-on” (the page i have added the calendar plugin shortcode) as a plugin filter, with “Also affect children” ticked.

    I have the custom post type ticked as supported in “Custom Post Type Support”.

    It is still returning a 404 – any ideas?

    https://www.ads-software.com/plugins/plugin-organizer/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Sterup

    (@foomagoo)

    I installed this plugin and got a 404 for the events I had created. Disabling plugin organizer didn’t help. Clicking save on the permalinks page fixed it but every event I create after that does the same thing and I have to click save on the permalink page for it to work. The problem is in the sugar calendar plugin. When they register their custom post_type they need to call flush_rewrite_rules( false );. Then it works. I added that code to line 45 of /wp-content/plugins/sugar-calendar-lite/includes/post-types.php and the problem is fixed. Please contact the author of the sugar calendar plugin and have them add that code to their file.

    Plugin Author Jeff Sterup

    (@foomagoo)

    You can test the fix out on your local copy of the plugin. It won’t fix the events you have already created though. Only new ones. Click save on the permalinks page to fix the events you have already created.

    Thread Starter jayseventwo

    (@jayseventwo)

    Awesome, that worked a treat, thanks!

    I also have the same problem with my directory – it is a premium plugin which i can send to you if required?

    https://codecanyon.net/item/sabaidirectory-for-wordpress/4505485

    Alternatively, is there something i can add to my functions.php file etc that will add this flush rule site wide?

    Plugin Author Jeff Sterup

    (@foomagoo)

    This must be called directly after registering the post_type. The plugin author needs to update their code. I came across this bug a few years ago and now always add the call to flush_rewrite_rules after registering a custom post_type. You can go through the plugin code and find the register_post_type call if you want. Then just add that code after it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘404 errors’ is closed to new replies.