Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#15620 closed defect (bug) (fixed)

Network setup page displays bad code after activation

Reported by: wpdavis's profile 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 14 years ago.
15620.diff (514 bytes) - added by scribu 14 years ago.

Download all attachments as: .zip

Change History (9)

#1 @wpdavis
14 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/.

#2 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.1

Do we need $base outside of the conditional?

#3 @wpdavis
14 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.

#4 @ryan
14 years ago

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

#5 @scribu
14 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().

@scribu
14 years ago

#6 @scribu
14 years ago

  • Keywords has-patch added; needs-patch removed

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

#7 @nacin
14 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.