[wp-trac] [WordPress Trac] #35562: Single post pagination redirect back to page one with nextpage tag - WordPress 4.4.1
WordPress Trac
noreply at wordpress.org
Sat Jan 23 05:06:44 UTC 2016
#35562: Single post pagination redirect back to page one with nextpage tag -
WordPress 4.4.1
--------------------------+-----------------------------
Reporter: pietergoosen | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Canonical | Version: 4.4
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------------
Comment (by pietergoosen):
Replying to [comment:3 birgire]:
> The problem is that {{{WP::handle_404()}}} is executed long before
{{{WP_Query::setup_postdata()}}} where the {{{content_pagination}}} filter
currently lives.
>
> I don't think we want to remove a restriction in {{{handle_404()}}} that
makes sure the current page number doesn't exceed the maximum number of
content pages.
>
> If we want to keep it, I suggest we try to move the content pagination
logic (including the {{{content_pagination}}} filter) from the
{{{setup_postdata()}}} up to the {{{handle_404()}}} method.
>
> The current content pagination isn't supposed to work for secondary
loops anyways, as far as I understand it, even though the
{{{content_pagination}}} filter is available to all loops through
{{{setup_postdata()}}}.
>
> To support such a restriction for secondary loops, I think the
corresponding post ID would need to be part of the GET request.
>
>
> ... or do you see any other way ?
What bothers me about this whole issue, and why I suggested to remove that
section of code for now is that we can successfully pages to any added
pages (through the {{{content_pagination}}} filter) when a {{{<!--
nextpage-->}}} tag is not set in the post content. Why can we page past
page 1 and any other page after that when we do not have the {{{<!--
nextpage-->}}} tag. Is that because there is nothing concretely set to
test for a 404 when we page a single post. From what I make from all
relevant code is that there is nothing that catches or set a 404 page when
we page a single post. Paging a single post is definitely not something
new. I really did not have time to test anything after the submission of
this ticket due to a massive power failure, so I'm stuck on a mobile
device for now.
I think that we will need to look at the whole process of paging a single
post and when to set a 404. We should not just look at the {{{<!--
nextpage-->}}} tag.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35562#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list