Page 1 of 2

How to fix next page error?

Posted: Fri Feb 05, 2016 5:35 am
by Christine
I have an issue where if I click 'next page' to go to page 2 of a category, a tag, or search results, I get a blank page saying 'No entries to print'.

I've looked at a few answers on the forum, but they don't seem to apply. I'm using (a fork of) the Artistic theme, if that helps.

Re: How to fix next page error?

Posted: Fri Feb 05, 2016 6:24 am
by Don Chambers
Christine - what version of serendipity are you using? That sounds vaguely familiar - as if it was an error of a past version that has since been corrected. Perhaps you can upgrade to the latest (2.0.3) if you are not already using it?

It would also be helpful if you could post a URL to your site.

Re: How to fix next page error?

Posted: Fri Feb 05, 2016 9:45 am
by Christine
I'm on 2.02. I'll try 2.03, but it might take a little while as I've customised quite a few things and want to be sure I don't overwrite anything.

Re: How to fix next page error?

Posted: Fri Feb 05, 2016 10:21 am
by Christine
I just realised the Artistic template is pretty old - could this cause any problems?

Re: How to fix next page error?

Posted: Fri Feb 05, 2016 10:55 am
by onli
Yes, as the theme is building the pagination links. You could try with 2k11 to be sure.

Re: How to fix next page error?

Posted: Fri Feb 05, 2016 11:30 am
by Christine
OK, I've upgraded and the problem remains.

I actually forgot that I did already test this with various themes, and the problem was still there. Just checked again and yep, the theme makes no difference.

Re: How to fix next page error?

Posted: Fri Feb 05, 2016 11:32 am
by yellowled
Christine wrote:I actually forgot that I did already test this with various themes, and the problem was still there. Just checked again and yep, the theme makes no difference.
Did you clear the template cache in the maintenance section of the backend (after switching themes)? Can you please post a URL to the live blog where this happens?

YL

Re: How to fix next page error?

Posted: Fri Feb 05, 2016 11:47 am
by Christine
Just tried that and no change.

The blog is not live but I could PM you a link + login if you like.

Re: How to fix next page error?

Posted: Fri Feb 05, 2016 3:44 pm
by Don Chambers
Are you using URL rewriting?

Re: How to fix next page error?

Posted: Sat Feb 06, 2016 4:02 am
by Christine
Yes, the following rules are in my .htaccess for categories and search (I can't see anything for freetag):

Code: Select all

RewriteRule ^(categories/[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^search/(.*) index.php?url=/search/$1 [L,QSA]
There are a couple more general rules in there, let me know if you need to see more. I don't really know what is relevant or not.

Re: How to fix next page error?

Posted: Sun Feb 07, 2016 8:04 am
by Christine
It turns out my problem was the same as here: http://board.s9y.org/viewtopic.php?t=15207 - I had removed the prefix from the entries permalink. Add a prefix fixed it :wink:.

I was afraid that meant I'd lose my preferred url structure for the entries, but with the Custom Permalinks plugin, it's fine, I can still leave out the prefix in each entry url.

ETA: The only issue is now comments don't show up when you go to an entry with a custom permalink, which is 195 posts in total. Is there any way to have the comments show without me having to change the permalink of every post, which is a) a lot of work, and b) not the url that I want for them anyway.

Re: How to fix next page error?

Posted: Sun Feb 07, 2016 2:39 pm
by Timbalu
Christine wrote:The only issue is now comments don't show up when you go to an entry with a custom permalink, which is 195 posts in total. Is there any way to have the comments show without me having to change the permalink of every post, which is a) a lot of work, and b) not the url that I want for them anyway.
Even related tag entries won't show up. So this is part of the structure, I assume. But the default entries archives view is still there, with all those attributes, eg "/serendipity/archives/54-test-custom-permalinks.html".

Can you give me a URL to see what you mean by this?
For what exact case do you use the custom permalinks plugin? Is that as to be some kind of "poor mans static pages"? Is it to display old content you have ported?

Re: How to fix next page error?

Posted: Thu Feb 11, 2016 3:46 am
by Christine
Timbalu wrote:Can you give me a URL to see what you mean by this?
It's not currently live as many things aren't ready, but I'll PM you a URL and login.
Timbalu wrote:For what exact case do you use the custom permalinks plugin? Is that as to be some kind of "poor mans static pages"? Is it to display old content you have ported?
Yes (to the latter), I imported all my posts from another blogging host and used it to rename them. Also, I used it to get rid of things like commas and, where characters like 'é' were left out, I replaced them with non-diacritic versions like 'e' (although I'm guess I could probably define this somewhere so it happens automatically). I also didn't like permalink/ in the URL and so made everything /blog/post-title.html.

Just to clarify that a bit better - /blog/ is the root folder of my Serendipity installation. permalink/ was the prefix originally in the Entry URL structure. So all the posts were imported as .../blog/permalink/post-title.html. I removed permalink/ in the Permalinks configuration for the Entry URL structure - not knowing it would cause the issue I originally described in this thread. Then when I was editing each entry, I removed permalink/ from in the Custom Permalinks field.

I'm really hoping there is a way I can keep the post names as /blog/post-title.html, I just find it a lot neater and as I mentioned I would have to manually change a bunch of post titles as well as find and change links to other posts that might be in some of the entries.

Re: How to fix next page error?

Posted: Thu Feb 11, 2016 10:28 am
by Timbalu
We just added a S9y-2.1-Dev description note to the Permalink fields, which says:
Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.
This, since we have this issue coming up around once a year and it seems to be not clear enough with the current state.

Do not remove the path prefix completely. Without a prefix, Serendipity will think that the normal blog access page is requested because of the regular expression matches.
And do not touch it when using the custom permalink plugin anyway.
The custom permalink plugin redirect has the restriction already mentioned. I currently have no idea on how to solve them, but I'll try to think about it.

Re: How to fix next page error?

Posted: Tue Feb 16, 2016 5:38 am
by Christine
Thanks, Timbalu. I'm starting to accept there's probably no way around this, and think I can find a prefix I can live with. I'll just have to dive in and change all the post names. Is there a particular place the post names are stored, so maybe I can do a batch replace?