Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
BUG: After upgrading to SP 5.6 Permalink leads to 404 error
Avatar
Blaise
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Apr 25, 2016 - 7:44 am

Hi,

I am getting a 404 error on my forum links... approximately half of the time. Then when I hit refresh on the browser my page displays correctly...

My forum permalink structure is:

http://my_url/forum/forum_slug.....topic_slug

I have:

  • deleted my page cache, several times (zencache)
  • flushed my object cache (Redis)
  • In wordpress, resaved the permalink structure (settings / permalink -> save)
  • In SP Admin panel, saved the permalink structure (Integration / page and permalink)
  • and finally purchased a bronze membership support plan

This also affect the private messaging system.

Any thoughts?

Avatar
Blaise
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Apr 25, 2016 - 8:49 am

Same problem I had in December, but this time running these fixes did not help:

https://simple-press.com/suppo.....404-error/

Avatar
Blaise
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Apr 25, 2016 - 8:51 am

I should correct the title: the problem arrived when upgrading to SP 5.6.5

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 25, 2016 - 9:08 am

Well as once again you are the only user experiencing this issue and it has also happened to you once again following updating then I think the first thing I need to do is go back to my very last comment on the thread you have linked to.

You clearly seem to have some instability in your WordPress rewrite rules and I am guessing you never did find out what mght be causing it. So let's look at that again.

What else changed over this update period. I assume WordPress itself - so what about other plugins and your theme? And back to the previous question which was not answered at the time regarding any other plugin that may be performing rewrites? 

andy-signature.png
YELLOW
SWORDFISH
Avatar
Blaise
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Apr 25, 2016 - 9:50 am

Hi,

I keep my theme, wordpress and plugins up to date, so all of these have been upgraded in the last 3 months. 

The only plugin I changed was moving from Google XML sitemap to Better WP GoogleXML sitemap. 

In terms of plugins with rewrite settings:

- events manager

- Better Wordpress Google XML Sitemaps

 

I don't know how to continue in my chase for the bug.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 25, 2016 - 10:41 am

Blaise Fiedler said
Hi,

I keep my theme, wordpress and plugins up to date, so all of these have been upgraded in the last 3 months. 

The only plugin I changed was moving from Google XML sitemap to Better WP GoogleXML sitemap. 

In terms of plugins with rewrite settings:

- events manager

- Better Wordpress Google XML Sitemaps

I don't know how to continue in my chase for the bug.

Nor me to be perfectly honest. While there may be other conditions the only 2 events I have encountered over many years where 404's become prevalent are if:

  1. Something has rebuilt the WP rewrite rules without allowing other plugins to add their requirements (i.e., by replacing rules instead of adding them)
  2. Something is manipulating the URL's after the http request but before processing starts . Yoast SEO can do this, for example, as have some redirection plugins encountered n the past.

I can't, of course, test whether either of these conditions applies. You would basically need to deactivate items one at a time - re-update permalinks and re-test to find out. Your site history strongly suggests, however, that something along these lines needs to be carried out.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 25, 2016 - 3:19 pm

so still now working?  go to the wp settings - permalinks page... this will update all rules...  if not working, try going to forum - integration - page and permalink and updating ours again...  if still not working, then I would deactivate and reactivate simple press plugin...  do NOT uninstall, just deactivate and reactivate... see if better..

if not, then you need to do as Andy says (and may want to anyways) and debug further as another plugin may be incorrectly doing rewrite rules...  start by changing to default wp theme... better?  if not, deactivate all other plugins and see how working... if working, reactivate one by one until breaks...

any special rules in .htaccess file in your wp root?

Avatar
Blaise
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Apr 25, 2016 - 3:26 pm

Thanks a lot Mr Papa for your support. What really bugs me is that it sometimes works, sometimes does not, and when it does not (I get a 404) a simple page refresh *always* works. 

 

I'm running a blend of apache and nginx. I checked .htaccess and it all looks standard:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

 

I implemented a rewriting rules debugging tool. 

When the page loads correctly I get:

<!- Matched Rewrite Rule: forum/([^/]+)/([^/]+)/?$ ->
<!- Matched Rewrite Query: pagename=forum&sf_forum=suggestions-et-questions-sur-le-site&sf_topic=topic-slug ->

When the page does not load correctly:

<!- Matched Rewrite Rule: ?None? ->
<!- Matched Rewrite Query: None ->
<!- Loaded Template: 404.php ->

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 25, 2016 - 3:29 pm

sometimes works and sometimes not??

are you caching anything?  or minifying js scripts?

do you have link to site?

Avatar
Blaise
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Apr 25, 2016 - 3:29 pm

Mr Papa said
so still now working?  go to the wp settings - permalinks page... this will update all rules...  if not working, try going to forum - integration - page and permalink and updating ours again...  if still not working, then I would deactivate and reactivate simple press plugin...  do NOT uninstall, just deactivate and reactivate... 

Thanks! I tried steps 1 and 2 most of the afternoon, but did not think about step 3. Will try and report.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625