Page 1 of 1
Categories next page not working in 2.0
Posted: Sat Sep 12, 2015 4:22 am
by latcarf
Hi all,
When I go to http://myblog_domain/categories/ I see a page with the first 25 of all the entries in my blog. The footer has a link for "next" page which is http://myblog_domain/categories/P2.html but when I click on that, it still shows the first 25 entries (i.e. page 1). Except, on this new page, the link is now http://myblog_domain/categories/P2/P2.html (note the extra P2 in the url). Click it again and you see the first 25 entries again but the link is now: http://myblog_domain/categories/P2/P2/P2.html
I expect this is a problem with the redirects in .htaccess (yes, we're using regular Apache mod_rewrite option for URL rewrites) and this is a problem both in a blog upgraded from 1.7 to 2.0 and on one that started life as 2.0. Anyone have some insight into the issue?
Thanks!!
Re: Categories next page not working in 2.0
Posted: Sat Sep 12, 2015 9:27 am
by onli
No further insights that, but I can confirm the bug. Is /categories a valid page?
Re: Categories next page not working in 2.0
Posted: Sat Sep 12, 2015 10:55 am
by yellowled
onli wrote:Is /categories a valid page?
If you change the name “categories” like I did in my blog, both the page for (just) the new and the original name (
http://yellowled.de/thema vs
http://yellowled.de/categories) throw a 404 (in my case at least).
YL
Re: Categories next page not working in 2.0
Posted: Sun Sep 13, 2015 9:21 am
by Timbalu
I assume you did not carefully read the upgrader notes (somewhere in/with early 1.7.x), wanting you to manually change some things, when using specific themes like bulletproof as a copy template.
Please follow:
http://board.s9y.org/viewtopic.php?f=3& ... p=10436169
If that is not the case, you have a problem with htaccess. Show us its content and also clear if you have another htaccess file in the domain root, which might interfere badly.
Also see that
http://blog.latcarf.com/categories/ gives an empty page with an echoed index.php string. This should not happen and fall down to the 404 error defined page (defined in htaccess or by the staticpage plugin), which normally is just the blogs root /index.php file.
Re: Categories next page not working in 2.0
Posted: Sun Sep 13, 2015 1:26 pm
by onli
Ian, i have the same error in my blog:
https://www.onli-blogging.de/categories/. Klick through to the next page and then again to the following. This is not an user error.
Re: Categories next page not working in 2.0
Posted: Sun Sep 13, 2015 3:33 pm
by Timbalu
Hmm, right! (The latcarf blog 404 fallback echoed "index.php" string is, though!)
Ok. Lets see.
We have category links like such:
Code: Select all
/categories/1-firstcat
/categories/2-othercat
You normally
never have a link like this "/categories/" or "/categories", empty alone.
The htaccess works as follow:
Code: Select all
ErrorDocument 404 {PREFIX}{indexFile}
...
RewriteRule ^({PAT_PERMALINK_CATEGORIES}) {indexFile}?/$1 [NC,L,QSA]
RewriteRule ^{PAT_ARCHIVES} {indexFile}?url=/{PATH_ARCHIVES}/$1.html [NC,L,QSA]
...
If you need to have access to an empty "/categories/" link, stopping you from falling back to the index.page, you need to set a staticpage 404 page, via the staticpage options. This works! (And is the case at YLs blog too, I assume.)
Or write an exception for the categories case to the entries pagination function. I would not think disabling the categories rewrite rule in the htaccess would help here without breaking something else.
I think you just need to decide what you want (normal behaviour is what you have on your blog, Onli).
A directory link without specific category id-name does not happen.
If you really want it, you would need a own index file, which is what a defined staticpage 404 does.
All other behaviour works well
http://blog.latcarf.com/categories/1-Computing/P3.html etc pp.
Re: Categories next page not working in 2.0
Posted: Sun Sep 13, 2015 9:06 pm
by yellowled
Timbalu wrote:If you need to have access to an empty "/categories/" link, stopping you from falling back to the index.page, you need to set a staticpage 404 page, via the staticpage options. This works! (And is the case at YLs blog too.)
I do
not have a staticpage 404 page. However, my index.tpl contains
which is probably the same, technically.
YL
Re: Categories next page not working in 2.0
Posted: Mon Sep 14, 2015 9:33 am
by Timbalu
Yeah. I didn't mention that specifically, but it is technically the same approach.
Re: Categories next page not working in 2.0
Posted: Mon Sep 14, 2015 9:42 am
by onli
Okay. Hoping I understand that right, if /categories is not a valid page, I would not count this as a real bug. I expected this to be an alternative page to show all articles from all categories.
But it is still strange behaviour. To properly fail there with a hard 404 would be better.
Re: Categories next page not working in 2.0
Posted: Wed Oct 07, 2015 3:22 pm
by garvinhicking
Hi!
Yeah, /categories/ alone was never meant to be a proper view; "all articles from all categories" would be the blog / itself
Of course I agree that in this case the 404 view would need to be triggered, though...