Make WordPress Core

Opened 13 years ago

Closed 10 years ago

#16468 closed defect (bug) (fixed)

Twenty Ten: 404 page with /page/2 shows page number

Reported by: rob1n's profile rob1n Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: minor Version: 3.0
Component: Bundled Theme Keywords: has-patch commit
Focuses: Cc:

Description

In 2010, there's a custom part of the title that shows " | Page 2" etc for paged posts.

Yet, even if it's a 404, it still shows this if there's a $page or $paged variable.

e.g. /2012/04/page/2 (picked to obviously 404) is: Page not found | robinadr | Page 2 on my site.

Checked trunk, same problem there.

Attachments (4)

paged-404.diff (500 bytes) - added by rob1n 13 years ago.
16468.diff (931 bytes) - added by MikeHansenMe 10 years ago.
Refresh with brackets
404.patch (3.9 KB) - added by psoluch 10 years ago.
Patch for all bundled themes
body_class.patch (441 bytes) - added by psoluch 10 years ago.
Removed a paged-{nr} class from <body>

Download all attachments as: .zip

Change History (17)

@rob1n
13 years ago

#1 @rob1n
13 years ago

  • Cc robin.adr@… added

#2 @nacin
13 years ago

  • Version changed from 3.1 to 3.0

It'd be great to have a helper to prevent the page/paged conditional as well as the max() call. Like get_queried_page_num() and has_multiple_pages() (for other checks in the theme).

#3 @rob1n
13 years ago

  • Cc robin.adr@… removed

Yeah, having to global those variables and do the max() handling in a theme seems clumsy.

How about is_paged() and get_current_page_number()?

#4 @nacin
13 years ago

We already have is_paged(), which checks the is_paged query flag. I think we need more for when it is instead the page query variable.

#5 @scribu
12 years ago

Related: #16973

This ticket was mentioned in IRC in #wordpress-dev by nacin. View the logs.


10 years ago

This ticket was mentioned in IRC in #wordpress-dev by doc-bot. View the logs.


10 years ago

#8 @lancewillett
10 years ago

  • Component changed from Themes to Bundled Theme
  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to Future Release
  • Summary changed from 404 page with /page/2 shows page # to Twenty Ten: 404 page with /page/2 shows page number

@MikeHansenMe
10 years ago

Refresh with brackets

#9 @psoluch
10 years ago

Tested the patch and it works for me.

#10 @obenland
10 years ago

  • Keywords commit added; needs-refresh removed
  • Milestone changed from Future Release to 4.0

Tested at WordCamp Switzerland contributor day.

@psoluch
10 years ago

Patch for all bundled themes

@psoluch
10 years ago

Removed a paged-{nr} class from <body>

This ticket was mentioned in IRC in #wordpress-dev by obenland. View the logs.


10 years ago

#12 @SergeyBiryukov
10 years ago

In 28249:

Prevent 'paged-*' from being added to body classes on 404 error pages.

props psoluch.
see #16468.

#13 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 28250:

Prevent 'Page %s' from being added to page title on 404 error pages in bundled themes.

props psoluch, rob1n.
fixes #16468.

Note: See TracTickets for help on using tickets.