WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 7 months ago

Last modified 5 months ago

#24960 closed defect (bug) (fixed)

Multisite activation page header shows as "Page Not Found"

Reported by: nullvariable Owned by: nacin
Milestone: 3.7 Priority: normal
Severity: normal Version: 3.7
Component: Multisite Keywords: dev-feedback has-patch
Focuses: Cc:

Description

When activating a new user the header for wp-activate.php renders the title as "Page Not Found" and returns a status code of 404.

This appears to be the case with an activation key or without.

The attached patch modifies the file to unset the 404 status and apply a generic title to all versions of the page.

Attachments (2)

wp-activate.diff (618 bytes) - added by nullvariable 9 months ago.
fixes 404 status and outputs a generic header (removed debug line)
wp-activate.2.diff (357 bytes) - added by nullvariable 8 months ago.
404 fix only

Download all attachments as: .zip

Change History (13)

comment:2 nullvariable9 months ago

this fix could mirror the current fix applied to wp-signup.php found on line 35.

I added a filter to the wp_title function that outputs a more descriptive generic title but this could go either way.

If this fix seems to be the best way to approach it currently, it may be worth going back to wp-signup.php and adjusting it to follow a similar pattern.

nullvariable9 months ago

fixes 404 status and outputs a generic header (removed debug line)

comment:3 follow-up: jeremyfelt8 months ago

  • Keywords needs-patch added; has-patch removed

I can confirm the 'Page not found' title in trunk on wp-activate.php. The header is also a 404.

I haven't tested the patch yet or investigated the underlying issue, but it appears to do too much at first glance by adding a filter/function for the title.

nullvariable8 months ago

404 fix only

comment:4 nullvariable8 months ago

  • Keywords has-patch added; needs-patch removed

I've uploaded a patch that only resolves the 404 issue.

comment:5 jeremyfelt8 months ago

  • Milestone changed from Awaiting Review to 3.7

comment:7 follow-up: ocean907 months ago

I thought we had fixed this, see #13638.

wp-signup.php still has $wp_query->is_404 = false;

comment:8 in reply to: ↑ 3 ocean907 months ago

Replying to jeremyfelt:

I can confirm the 'Page not found' title in trunk on wp-activate.php. The header is also a 404.

I can't reproduce this on trunk with any Twenty* theme.

comment:9 in reply to: ↑ 7 nullvariable7 months ago

Replying to ocean90:

I thought we had fixed this, see #13638.

wp-signup.php still has $wp_query->is_404 = false;

You are correct. wp-signup.php still contains this code.

The file at issue here is wp-activate.php, this ticket is about applying the same fix to wp-activate.php as was applied to wp-signup.php.

comment:10 nacin7 months ago

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

In 25690:

Avoid 404 for wp-activate.php.

props nullvariable.
fixes #24960.

comment:11 SergeyBiryukov5 months ago

  • Version changed from trunk to 3.7
Note: See TracTickets for help on using tickets.