‘Previous entries’ gives 404
-
Just realized when I click on Previous entries at the bottom of my index page, it goes to /page/2/ but it’s a 404… any ideas?
-
This dosen’t solve the issue… (for me at least!) The link you posted is for a different issue not related to the one being discussed in this thread…
I looked at your page and I think I have a solution.
There is a conflict of names that drives WordPress crazy:
1. the base category name you have chosen is: “blog”
https://www.creativeworld.com.au/blog/events/2. the static page name with a blogging template is also: “blog”
https://www.creativeworld.com.au/blog/The solution is just to change the static page’s name.
1. Go to Dashboard/ Manage/ Page
2. Choose to edit the page “Blog”
3. Change the name of this page to “My Blog” (for example)
4. Edit the permalink below to: https://www.creativeworld.com.au/my-blog/ (for example)Hope it helps.
Thanks for taking a look gregory.poland!
I actually found the same solution by testing a lot of different configurations… basically I found that if the static page for your blog posts is called “ABC” and the permalinks structure has the same base ie- “ABC/date/category/post-name”, WordPress goes crazy with conflicting names… (well, only in the pagination department!)
My configuration:
mydomain.com/blog/ < Static page for blog post
mydomain.com/blog/category/post-title < Permalink structure for blog postsWhat you’ve suggested is:
mydomain.com/my-blog/ < Static page for blog post
mydomain.com/blog/category/post-title < Permalink structure for blog postsUnfortunately for me, renaming the static page or permalink base is just not an option – It dosen’t make sense from website structure point of view.. any other ideas?
I do have an idea on a fix – I think the variable needs to be used in the same place – as mentioned, WordPress will see the static page for posts “ABC” and permalink base “ABC” as two different objects… but perhaps they need to be the same?? – ie:
mydomain.com/%blog%/
mydomain.com/%blog%/%category%/%post-name%/I have no idea how to solve the problem but really hope someone can share the solution soon!!
creativeworldstudio
Thank you for documenting this. I agree with you that changing the structure isn’t an ideal solution.
My biggest concern is if your site has been up for a while you will be destroying any page ranking you may have. Basically search engines will see these as new pages (at least from my experience). This has been a known problem since 2.5.0 and I am bummed to see that it doesn’t appear to be on the 2.6.1 release. That means that it will be several more months before it gets corrected.
In 2.5 there was a hack around it but I haven’t seen anything for the last two versions. I tried raising the status of the bug but it just got reset.
As a PHP hobbiest I tried to determine the solution myself but unfortunately the rewrite section is above my skill level.
If anyone can shed some light and expidite a solution please let me know how.
Thanks.
I was having the same problem, am using 2.6, and just fixed it using Ryan’s recommended method from here.
So far I have not seen any negative side-effects.
After spending the past 6 weeks searching the web for a fix to this problem I finally found one that actually works!
https://barefootdevelopment.blogspot.com/2007/11/fix-for-wordpress-paging-problem.html
The code he created was to fix an issue with WP 2.2.1, but works perfectly in 2.6! Hopefully this will be helpful for the rest of you guys.
This is very confusing…
Much like jk079, I am also running a custom frontpage.
(WP 2.6) When I go into Settings > Permalinks > Custom Structure and type in “https://www.kimstewart.ca/blog/%postname%/” it fixes the pagination issue on my blog.However, when I click a post, it also adds the extra “https://www.kimstewart.ca/” … lol
I also noticed that WordPress adds an extra “/” in front of anything you type into the Custom Structure box. … This may be the problem?
Any ideas how to fix?
WOW.. I don’t know how to say this, but I gave the original fix by Ryan another go after markmathson said it solved his issue.. and what do you know – it worked!
I’m a bit lost for words.. I had tried it a number of times, step by step, honestly.. and nothing happened! but today the sun is shinning and it appears to be working very nicely!
Here’s the proof: My blog’s page 2 at Creative World ??
Just want to say big thank you to all who helped out in looking/finding/solving the problem and solution. It was much appreciated.
You’re right! It’s working, creativeworldstudio! Thanks for the tip. Maybe it was the latest WordPress 2.6.1 upgrade that allowed this fix to work, or maybe I forgot to hit Save Changes after I made changes to rewrite.php, but it is indeed finally working!
For all of those that don’t know what to do, just do *exactly* this:
in “/wp-includes/rewrite.php”
replace “$this->use_verbose_page_rules = false;”
with “$this->use_verbose_page_rules = true;”Then go into WordPress CMS, click Settings->Permalinks page and click “Save Changes”.
Done! ??
Thankfully this fixed resolved the issue for me too, without having to change the structure of my permalinks or the name of my static post page.
And finally I understand why it is happening, with my static post page (“blog”) matching the opening subfolder of my permalink structure (/blog/%postname%/).
At least they now co-exist without having to change either setting, until the issue is fully resolved without manual editing of rewrite.php!
Thanks to all above in this thread for sorting it out, posting solutions and making it easier for me. I’ve had this issue in the past and never got it resolved until now.
OK, I am getting a 404 again when I click previous entries… Anybody else having the same issue all of a sudden?
Hey i found I was having this issue (where the “previous entries” link on the front page would return a 404) and I tried everything people said on here to no avail.
As I re-read the comments I noticed that someone mentioned the permalinks rewrite plug-in and a light bulb went off over my head. All i had to do was add:
/page/
into the first box in this plug-in (the one titled “Paths to be skipped Separate each entry with a new line. Matched with regular expression.”) and save it.Now my site is working correctly
Just wanted to say that jrm213 had the only solution that worked for me (see above). Nice work and thanks!
Arhhh.. I upgraded my blog 2 weeks ago and thought this bug had been fixed. Silly me for assuming as today I notice that my pagination hasn’t been working.
I’m disappointed to see this major bug didn’t get addressed in 2.6 and 2.7 (after it was discovered in 2.3 / 2.5 !) – Fingers crossed it can be sorted in 2.8.
(btw- the original fix still solves the issue)
I ran into this issue as well. I attempted to “fix” it:
https://trac.www.ads-software.com/attachment/ticket/6603/rewrite.patchAnyone willing to test it out?
- The topic ‘‘Previous entries’ gives 404’ is closed to new replies.