WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13638 closed defect (bug) (fixed)

Do not show a 404 title on wp-activate.php

Reported by: ocean90 Owned by: wpmuguru
Milestone: 3.0 Priority: low
Severity: normal Version: 3.0
Component: Multisite Keywords: has-patch dev-reviewed
Focuses: Cc:

Description

Reported by mngreg:

I noticed one very small thing while testing: When I clicked the activation link in the e-mail that was sent to me after I signed up, the title of that page it took me too was "Not Found," though everything worked fine and the page content included the confirmation message, etc.


Attachments (4)

13638.patch (362 bytes) - added by ocean90 4 years ago.
13638.2.patch (670 bytes) - added by ocean90 4 years ago.
Set is_home = true to get name+description as title, same for wp-signup.php
13638.3.diff (504 bytes) - added by wpmuguru 4 years ago.
13638.4.diff (2.0 KB) - added by wpmuguru 4 years ago.
teh rewrites for review

Download all attachments as: .zip

Change History (15)

ocean904 years ago

comment:1 wpmuguru4 years ago

  • Owner set to wpmuguru
  • Status changed from new to accepted

comment:2 wpmuguru4 years ago

I'm not able to reproduce the 404 title on activation in either a subdomain or folder install.

comment:3 wpmuguru4 years ago

Occurs when custom permalinks are set.

ocean904 years ago

Set is_home = true to get name+description as title, same for wp-signup.php

comment:4 westi4 years ago

  • Cc westi added
  • Keywords 2nd-opinion added

A better fix for this would be to add some rewrite rules to the internal rewriter so that it matches for the request.

I just tested with the following hacked in in the right place and the direct setting of $wp_query attributes removed.

$robots_rewrite['.*wp-signup.php$'] = $this->index . '?signup=true';
$robots_rewrite['.*wp-activate.php$'] = $this->index . '?activate=true';

That kind of thing does the trick.

We need to decide how we want them to rewrite though.

comment:5 wpmuguru4 years ago

@ocean90: we don't want to be setting $wp_query variables directly like that. Even though we aren't requiring php5, we should observe class abstraction where we can.

wpmuguru4 years ago

comment:6 wpmuguru4 years ago

  • Keywords dev-feedback added; 2nd-opinion removed

13638.3.diff works. Since activation & signup are not looking for posts/pages. I don't see the point of running through the rewrites checking for matches. Are there reasons we wouldn't want to apply that patch?

comment:7 nacin4 years ago

I like westi's approach. 13638.3.diff seems like a patch that could break some very peculiar deep integration use cases and shouldn't go in during an RC.

wpmuguru4 years ago

teh rewrites for review

comment:8 westi4 years ago

  • Keywords dev-reviewed added; dev-feedback removed

That last patch looks great :-)

comment:9 wpmuguru4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [15081]) add rewrites for registration pages, fixes #13638

comment:10 wpmuguru4 years ago

Quick note for anyone following the ticket - you need to flush your rewrite rules before that change takes effect.

comment:11 nacin4 years ago

I bumped the db version in [15084] to trigger a flush for this.

Note: See TracTickets for help on using tickets.