Support Forum

Permalinks and 404 (Have to refresh a lot)

KL Kim L
Kim L
Member

I am trying to get to the bottom of why the permalinks have to be refreshed constantly because I get a 404 when I try to go to the forums.  Today I compared the before and after for wp_options (rewrite_rules) and resaved my permalinks to get the forum to show again.  I have to do this almost daily or two times a day at times.

I noticed that the forum had rewrite rules, and now with the refresh they are gone.

These are missing from the new rewrite rules after refresh…

s:16:”forums/banned/?$”;
s:40:”index.php?pagename=forums&sf_banned=view”;
s:16:”forums/policy/?$”;
s:40:”index.php?pagename=forums&sf_policy=show”;
s:27:”forums/private-messaging/?$”;
s:49:”index.php?pagename=forums&sf_pm=view&sf_box=inbox”;
s:33:”forums/private-messaging/inbox/?$”;
s:49:”index.php?pagename=forums&sf_pm=view&sf_box=inbox”;
s:40:”forums/private-messaging/send/([^/]+)/?$”;
s:71:”index.php?pagename=forums&sf_pm=send&sf_box=inbox&sf_member=$matches[1]”;
s:21:”forums/report-post/?$”;
s:40:”index.php?pagename=forums&sf_report=view”;
s:23:”forums/subscriptions/?$”;
s:47:”index.php?pagename=forums&sf_subscriptions=view”;
s:22:”forums/related-tags/?$”;
s:46:”index.php?pagename=forums&sf_related-tags=view”;
s:20:”forums/unanswered/?$”;
s:44:”index.php?pagename=forums&sf_unanswered=view”;
s:17:”forums/watches/?$”;
s:41:”index.php?pagename=forums&sf_watches=view”;
s:18:”forums/newposts/?$”;
s:41:”index.php?pagename=forums&sf_newposts=all”;
s:17:”forums/members/?$”;
s:41:”index.php?pagename=forums&sf_members=list”;
s:31:”forums/members/page-([0-9]+)/?$”;
s:61:”index.php?pagename=forums&sf_members=list&sf_page=$matches[1]”;
s:17:”forums/profile/?$”;
s:41:”index.php?pagename=forums&sf_profile=edit”;
s:25:”forums/profile/([^/]+)/?$”;
s:63:”index.php?pagename=forums&sf_profile=show&sf_member=$matches[1]”;
s:30:”forums/profile/([^/]+)/edit/?$”;
s:63:”index.php?pagename=forums&sf_profile=edit&sf_member=$matches[1]”;
s:13:”forums/rss/?$”;
s:37:”index.php?pagename=forums&sf_feed=all”;
s:21:”forums/rss/([^/]+)/?$”;
s:60:”index.php?pagename=forums&sf_feed=all&sf_feedkey=$matches[1]”;
s:17:”forums/([^/]+)/?$”;
s:46:”index.php?pagename=forums&sf_forum=$matches[1]”;
s:31:”forums/([^/]+)/page-([0-9]+)/?$”;
s:66:”index.php?pagename=forums&sf_forum=$matches[1]&sf_page=$matches[2]”;
s:21:”forums/([^/]+)/rss/?$”;
s:60:”index.php?pagename=forums&sf_forum=$matches[1]&sf_feed=forum”;
s:29:”forums/([^/]+)/rss/([^/]+)/?$”;
s:83:”index.php?pagename=forums&sf_forum=$matches[1]&sf_feed=forum&sf_feedkey=$matches[2]”;
s:25:”forums/([^/]+)/([^/]+)/?$”;
s:67:”index.php?pagename=forums&sf_forum=$matches[1]&sf_topic=$matches[2]”;
s:39:”forums/([^/]+)/([^/]+)/page-([0-9]+)/?$”;
s:87:”index.php?pagename=forums&sf_forum=$matches[1]&sf_topic=$matches[2]&sf_page=$matches[3]”;
s:29:”forums/([^/]+)/([^/]+)/rss/?$”;
s:81:”index.php?pagename=forums&sf_forum=$matches[1]&sf_topic=$matches[2]&sf_feed=topic”;
s:37:”forums/([^/]+)/([^/]+)/rss/([^/]+)/?$”;
s:104:”index.php?pagename=forums&sf_forum=$matches[1]&sf_topic=$matches[2]&sf_feed=topic&sf_feedkey=$matches[3]”;

These are additional and I cannot figure out what the mf_ plugin would be… 

s:17:”layout/([^/]+)/?$”;
s:44:”index.php?mf_key=layout&mf_value=$matches[1]”;
s:33:”layout/(.+?)/page/?([0-9]{1,})/?$”;
s:62:”index.php?mf_key=layout&mf_value=$matches[1]&paged=$matches[2]”;
s:47:”layout/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:61:”index.php?mf_key=layout&mf_value=$matches[1]&feed=$matches[2]”;
s:24:”layout_header/([^/]+)/?$”;
s:51:”index.php?mf_key=layout_header&mf_value=$matches[1]”;
s:40:”layout_header/(.+?)/page/?([0-9]{1,})/?$”;
s:69:”index.php?mf_key=layout_header&mf_value=$matches[1]&paged=$matches[2]”;
s:54:”layout_header/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:68:”index.php?mf_key=layout_header&mf_value=$matches[1]&feed=$matches[2]”;
s:24:”layout_footer/([^/]+)/?$”;
s:51:”index.php?mf_key=layout_footer&mf_value=$matches[1]”;
s:40:”layout_footer/(.+?)/page/?([0-9]{1,})/?$”;
s:69:”index.php?mf_key=layout_footer&mf_value=$matches[1]&paged=$matches[2]”;
s:54:”layout_footer/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:68:”index.php?mf_key=layout_footer&mf_value=$matches[1]&feed=$matches[2]”;
s:21:”hide_title/([^/]+)/?$”;
s:48:”index.php?mf_key=hide_title&mf_value=$matches[1]”;
s:37:”hide_title/(.+?)/page/?([0-9]{1,})/?$”;
s:66:”index.php?mf_key=hide_title&mf_value=$matches[1]&paged=$matches[2]”;
s:51:”hide_title/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:65:”index.php?mf_key=hide_title&mf_value=$matches[1]&feed=$matches[2]”;
s:15:”skin/([^/]+)/?$”;
s:42:”index.php?mf_key=skin&mf_value=$matches[1]”;
s:31:”skin/(.+?)/page/?([0-9]{1,})/?$”;
s:60:”index.php?mf_key=skin&mf_value=$matches[1]&paged=$matches[2]”;
s:45:”skin/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:59:”index.php?mf_key=skin&mf_value=$matches[1]&feed=$matches[2]”;
s:20:”media_url/([^/]+)/?$”;
s:47:”index.php?mf_key=media_url&mf_value=$matches[1]”;
s:36:”media_url/(.+?)/page/?([0-9]{1,})/?$”;
s:65:”index.php?mf_key=media_url&mf_value=$matches[1]&paged=$matches[2]”;
s:50:”media_url/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:64:”index.php?mf_key=media_url&mf_value=$matches[1]&feed=$matches[2]”;
s:22:”media_title/([^/]+)/?$”;
s:49:”index.php?mf_key=media_title&mf_value=$matches[1]”;
s:38:”media_title/(.+?)/page/?([0-9]{1,})/?$”;
s:67:”index.php?mf_key=media_title&mf_value=$matches[1]&paged=$matches[2]”;
s:52:”media_title/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:66:”index.php?mf_key=media_title&mf_value=$matches[1]&feed=$matches[2]”;
s:25:”search-exclude/([^/]+)/?$”;
s:52:”index.php?mf_key=search-exclude&mf_value=$matches[1]”;
s:41:”search-exclude/(.+?)/page/?([0-9]{1,})/?$”;
s:70:”index.php?mf_key=search-exclude&mf_value=$matches[1]&paged=$matches[2]”;
s:55:”search-exclude/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:69:”index.php?mf_key=search-exclude&mf_value=$matches[1]&feed=$matches[2]”;
s:18:”wpautop/([^/]+)/?$”;
s:45:”index.php?mf_key=wpautop&mf_value=$matches[1]”;
s:34:”wpautop/(.+?)/page/?([0-9]{1,})/?$”;
s:63:”index.php?mf_key=wpautop&mf_value=$matches[1]&paged=$matches[2]”;
s:48:”wpautop/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:62:”index.php?mf_key=wpautop&mf_value=$matches[1]&feed=$matches[2]”;

 

10 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

its is possible that you have encountered what we believe might be a bug but one that shouldn’t really happen. If our analysis is correct there can be times when the SP rewrite-rules are not refreshed when another plugin refreshes them from within the WP Admin.

It shouldn’t happen simply because a plugin should not be routinely flushing the rules. It should be a one off task when a plugin is first activated and maybe updated. So it might be called from bad plugin protocols inaction but still getting missed all the same.

This came about through work we did with one user trying to solve their similar problem. They offered to make the small code fix needed – actually seemed eager. But sadly they never did come back and tell us the result.

if you feel able to make the small edits needed then the best thing to do would be to look at the thread in question where they are described…

https://simple-press.com/support-forum/sp5-general-topics/persistent-404-errors-when-clicking-on-forum-links-in-forum-and-in-emails/

KL Kim L
Kim L
Member

I am happy to work on code.  Please tell me which to use … the one on post 4 by Mr Papa or the one on post 9 by you :)  

MP Mr Papa
Mr Papa
Member

this one:  https://simple-press.com/support-forum/sp5-general-topics/persistent-404-errors-when-clicking-on-forum-links-in-forum-and-in-emails/#p128637

KL Kim L
Kim L
Member

The edit is done :)  Do we watch and wait or do I need to do anything else at the moment? :)  

YS Yellow Swordfish
Yellow Swordfish
Member

clear your browser cache and see what happens!

KL Kim L
Kim L
Member

woke up to another 404 issue… had to refresh the permalinks again. I could get to buddypress (1.8) activity feed, but not the forums (simple-press) or my buddypress media gallery (rt media)

Looking at the admin log, all I see are a couple of posts scheduled late last night.  The server also backed up (which is quite a hefty feat)

my check of the rewrite rules showed the forums in place (not missing this time), the only one it shows a difference for this time is that weird mf_ which i have no clue what that would be and wpautoop

s:17:”layout/([^/]+)/?$”;
s:44:”index.php?mf_key=layout&mf_value=$matches[1]”;
s:33:”layout/(.+?)/page/?([0-9]{1,})/?$”;
s:62:”index.php?mf_key=layout&mf_value=$matches[1]&paged=$matches[2]”;
s:47:”layout/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:61:”index.php?mf_key=layout&mf_value=$matches[1]&feed=$matches[2]”;
s:24:”layout_header/([^/]+)/?$”;
s:51:”index.php?mf_key=layout_header&mf_value=$matches[1]”;
s:40:”layout_header/(.+?)/page/?([0-9]{1,})/?$”;
s:69:”index.php?mf_key=layout_header&mf_value=$matches[1]&paged=$matches[2]”;
s:54:”layout_header/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:68:”index.php?mf_key=layout_header&mf_value=$matches[1]&feed=$matches[2]”;
s:24:”layout_footer/([^/]+)/?$”;
s:51:”index.php?mf_key=layout_footer&mf_value=$matches[1]”;
s:40:”layout_footer/(.+?)/page/?([0-9]{1,})/?$”;
s:69:”index.php?mf_key=layout_footer&mf_value=$matches[1]&paged=$matches[2]”;
s:54:”layout_footer/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:68:”index.php?mf_key=layout_footer&mf_value=$matches[1]&feed=$matches[2]”;
s:21:”hide_title/([^/]+)/?$”;
s:48:”index.php?mf_key=hide_title&mf_value=$matches[1]”;
s:37:”hide_title/(.+?)/page/?([0-9]{1,})/?$”;
s:66:”index.php?mf_key=hide_title&mf_value=$matches[1]&paged=$matches[2]”;
s:51:”hide_title/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:65:”index.php?mf_key=hide_title&mf_value=$matches[1]&feed=$matches[2]”;
s:15:”skin/([^/]+)/?$”;
s:42:”index.php?mf_key=skin&mf_value=$matches[1]”;
s:31:”skin/(.+?)/page/?([0-9]{1,})/?$”;
s:60:”index.php?mf_key=skin&mf_value=$matches[1]&paged=$matches[2]”;
s:45:”skin/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:59:”index.php?mf_key=skin&mf_value=$matches[1]&feed=$matches[2]”;
s:20:”media_url/([^/]+)/?$”;
s:47:”index.php?mf_key=media_url&mf_value=$matches[1]”;
s:36:”media_url/(.+?)/page/?([0-9]{1,})/?$”;
s:65:”index.php?mf_key=media_url&mf_value=$matches[1]&paged=$matches[2]”;
s:50:”media_url/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:64:”index.php?mf_key=media_url&mf_value=$matches[1]&feed=$matches[2]”;
s:22:”media_title/([^/]+)/?$”;
s:49:”index.php?mf_key=media_title&mf_value=$matches[1]”;
s:38:”media_title/(.+?)/page/?([0-9]{1,})/?$”;
s:67:”index.php?mf_key=media_title&mf_value=$matches[1]&paged=$matches[2]”;
s:52:”media_title/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:66:”index.php?mf_key=media_title&mf_value=$matches[1]&feed=$matches[2]”;
s:25:”search-exclude/([^/]+)/?$”;
s:52:”index.php?mf_key=search-exclude&mf_value=$matches[1]”;
s:41:”search-exclude/(.+?)/page/?([0-9]{1,})/?$”;
s:70:”index.php?mf_key=search-exclude&mf_value=$matches[1]&paged=$matches[2]”;
s:55:”search-exclude/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:69:”index.php?mf_key=search-exclude&mf_value=$matches[1]&feed=$matches[2]”;
s:18:”wpautop/([^/]+)/?$”;
s:45:”index.php?mf_key=wpautop&mf_value=$matches[1]”;
s:34:”wpautop/(.+?)/page/?([0-9]{1,})/?$”;
s:63:”index.php?mf_key=wpautop&mf_value=$matches[1]&paged=$matches[2]”;
s:48:”wpautop/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$”;
s:62:”index.php?mf_key=wpautop&mf_value=$matches[1]&feed=$matches[2]”;

KL Kim L
Kim L
Member

Searching through the files … that is specifically in my purchased theme.

Glad the forum rules stuck, sad that it still had the 404 this morning.  Why would it, I wonder?

MP Mr Papa
Mr Papa
Member

but you lost other wp pages too?  so something is still messing up permalinks it seems and not necessarily related to forum (the other fix we gave you does appear to have corrected ours dropping)…

KL Kim L
Kim L
Member

Yes, thank you.  Will I have to make that change again if/when I update my forums when you update your code?  

MP Mr Papa
Mr Papa
Member

No, that change is already in 5.3 and will just replace yours when you upgrade…