Opened 9 years ago
Last modified 6 years ago
#36746 new defect (bug)
WP v4.5.1 broke something in the Permalinks settings
Reported by: | voidPortal | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.5.1 |
Component: | Permalinks | Keywords: | |
Focuses: | Cc: |
Description
WP v4.5.1 broke something in the Permalinks settings. The Plain Permalink settings do work, though:
One weird thing I saw just now while I was trying different Permalink settings is that several times the word "blog" appeared in all the Common Settings example URLs when it never had before. For instance:
http://domain/blog/2016/05/04/sample-post/
But it is no longer there now. Now that Day and name common setting shows as:
Change History (7)
This ticket was mentioned in Slack in #core by fregan. View the logs.
9 years ago
#6
@
9 years ago
So a couple of questions, what is the active theme. How is the custom post type code set is it in a site specific plugin or is it within a inc folder or the functions.php of the active theme?
Also does the issue still happen if you change the site to a default theme?
#7
@
9 years ago
The active theme is Songwriter (now 2.0.4), but this issue was happening with all themes I tried.
And I am not specifically using a custom post type.
If you were asking about the custom structure for my permalinks, if I tried to set the Permalinks to "Day and name" instead of "Plain" (which is the only one that still worked after upgrading to WordPress 4.5.1 and then 4.5.2), the structure is the out-of-the-box:
http://[domain]/%year%/%mothnum%/%day%/%postname%/
I just fixed the problem by adding this to my .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I never had to do that before upgrading to WordPress 4.5.1, however, so this is still puzzling to me.
And I have another WordPress site where upgrading to 4.5.1 did NOT break the permalinks.
The one where the permalinks did break has had posts posted every day since the beginning of this year and their category is identical. It is also a multisite WordPress, but then again so it my other site (a different multisite WP) where the permalinks never broke.
I am also experiencing the same issue. When upgrading to 4.5.1 every page on my site but the homepage results in a 404. When i rollback changes locally in GIT, the permalinks work just fine - so this tells me it is the 4.5.1 update.
The example voidPoprtal provided above with "blog" is just how wwe have our permalinks setup.
The custom permalinks for our site are setup as:
We were able to recover and get the permalinks working correctly by setting it to Post Name - but this is very detrimental to SEO.
================ UPDATED ======================
Someone had edited a custuom post type plugin with flush_rewrite_rules(); - commented this out, re-saved permalinks and it is now working correctly. Here is the code that was causing errors: