WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#15620 closed defect (bug) (fixed)

Network setup page displays bad code after activation

Reported by: wpdavis Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Network Admin Keywords: has-patch
Focuses: multisite Cc:

Description

Currently, the network setup page at wp-admin/network/setup.php returns rewrite rules and code for wp-config that doesn't work if accessed after the network is set up. The attached patch moves the $base definition inside the check to see if $_POST is set, else uses the $base that's set in the wp-config.

Attachments (2)

network-setup-fix-bad-base.patch (2.2 KB) - added by wpdavis 4 years ago.
15620.diff (514 bytes) - added by scribu 4 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 @wpdavis4 years ago

Probably could have been (a lot) clearer above: Problem with the rewrite rules etc. that are returned are that the RewriteBase, among other things, are set to /wp-admin/.

comment:2 @nacin4 years ago

  • Milestone changed from Awaiting Review to 3.1

Do we need $base outside of the conditional?

comment:3 @wpdavis4 years ago

  • Cc wpdavis added

@nacin: As far as I can tell, no. All the instances on the page are either handled by the conditional if multisite the multisite hasn't been put in the config file yet or using the $base that's set in wp-config. If post is set it generates $base, if not than it checks to see if multisite is set up and uses the global $base, and if ms isn't set up than you get a form.

comment:4 @ryan4 years ago

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

comment:5 @scribu4 years ago

  • Keywords needs-patch added; has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

This now causes problems before the network is setup, in wp-admin/network.php

The $base variable is null in network_step2().

@scribu4 years ago

comment:6 @scribu4 years ago

  • Keywords has-patch added; needs-patch removed

15620.diff re-generates $base if it is null.

comment:7 @nacin4 years ago

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

(In [17323]) Set base if we return to network step 2. props scribu, fixes #15620.

Note: See TracTickets for help on using tickets.