• Resolved BroadRippleInc

    (@broadrippleunlimited)


    I am having the problem that custom post type & private pages are becoming 404s – this problem is easily solved by saving (updating) the custom post type in the wp-admin section such as this url: https://yourdomain.com/wp-admin/admin.php?page=cptui_manage_post_types&action=edit and clicking save on either of the save button.

    The save button isn’t easily showing me a url that I could add to a server cron, so I am looking for help writing a server cron to do just that: save a custom post type every hour or so.

    Any help as to how to write a server cron OR how to solve this problem of custom post type pages & private pages becoming 404s is greatly appreciated.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I feel like we need to take some steps back and try to address possible issues from the very beginning. I am not presently seeing how routinely saving CPTUI’s settings would, should or could help handle something like this. It feels like an issue that is actually earlier in some process that needs to be taken care of then and there.

    So, you have some posts in a post type, and they’re privately published…sometimes they are loading something? and then suddenly they’re not and it’s showing a 404 page? and at least at the moment, re-saving our settings appears to be solving it and making them load something again?

    Is it possible that you have cases of being logged out vs logged in and that difference is playing a part?

    Thread Starter BroadRippleInc

    (@broadrippleunlimited)

    I would say that’s what’s happening. I think if pages get loaded by logged-out sessions, they trigger the 404 of the logged in pages. Saving the specific custom post type seems to be resetting consistently the page permissions.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    The only thing I know of for the plugin and what it does during a save/update routine is that it will to a permalink flush on next load of the admin_init hook, one time. If that’s the part that’s helping, then something definitely feels off because you shouldn’t be needing to flush rewrite rules so frequently just for the sake of private posts.

    There’s no permissions per say that get affected every time unless somehow the capability settings are tweaked. Those are typically stored in the database though.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Make any headway here @broadrippleunlimited ?

    Thread Starter BroadRippleInc

    (@broadrippleunlimited)

    I’ve tried several things and nothing is permanently solving this. I’ll keep you posted if I can figure something out, but I will say the only thing that is correcting this problem (when it arises) is to save the custom post type.

    I should note that I’m using WP-Members and Plugin Organizer, as well as BuddyPress, BP Simple Private, and BP Multi-Network, so there are perhaps a number of plugins that could be in conflict.

    I’ve tried deactivating the other plugins, or using custom plugin organizer settings per page (another way of deactivating plugins) and one form or another of this problem keeps coming back.

    There’s been one evolution though. It seems like public pages can also be affected, and usually when the Custom Post Type isn’t affected, the Private pages are, and vice versa.

    Is there a url I could put in a server cron that would do admin_init? (I’ll do my own research on that too).

    Thanks for all of the input, it is really appreciated as is this plugin.

    On another site I’m going to try WP-Members and a Custom Post Type and see if I get the same problems there.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    It’s definitely a very odd case that I’ve never seen before this support thread here.

    Part of me wants to say to use the “get code” functionality to export your settings and register the post types and taxonomies manually and then deactivate CPTUI. However that may also leave you stuck in this 404 error issue if it’s code in CPTUI that’s managing to help you “revive” the permalinks working.

    I still suspect some code somewhere in either the theme or other plugins not doing something quite right.

    Thread Starter BroadRippleInc

    (@broadrippleunlimited)

    I got it figured out. The problem was with the Plugin Organizer plugin and went away upon deactivating that plugin. This is unfortunate, because being able to manage the plugins that load on each page and optimizing your site accordingly gives performance benefits, but this problem cleared up for me on 2 sites after deactivating Plugin Organizer. Thanks for the help.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    thanks for the followup and details about what was causing your issues. I feel like this could be a bug on their end, but i won’t try to speak for their plugin at all.

    Thread Starter BroadRippleInc

    (@broadrippleunlimited)

    I’m sure it was. I deleted Plugin Organizer (to wipe the data from it) reinstalled it, and reconfigured it on both sites and have no problems. It’s so complex what Plugin Organizer does, that I will likely have to do that from time to time with all of the updates that happens.

    Sorry for bringing this to you, I’ll know where to look next time this comes up.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    No worries on bringing us in, better safe than sorry.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Custom Post Type & Private Pages become 404 errors’ is closed to new replies.