Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#15620 closed defect (bug) (fixed)

Network setup page displays bad code after activation

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

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 16 years ago.
15620.diff (514 bytes ) - added by scribu 16 years ago.

Download all attachments as: .zip

Change History (9)

#1 @wpdavis
16 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
16 years ago

  • Milestone Awaiting Review3.1

Do we need $base outside of the conditional?

#3 @wpdavis
16 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
16 years ago

  • Resolutionfixed
  • Status newclosed

#5 @scribu
16 years ago

  • Keywords needs-patch added; has-patch removed
  • Resolution fixed
  • Status closedreopened

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

The $base variable is null in network_step2().

@scribu
16 years ago

#6 @scribu
16 years ago

  • Keywords has-patch added; needs-patch removed

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

#7 @nacin
16 years ago

  • Resolutionfixed
  • Status reopenedclosed

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

Note: See TracTickets for help on using tickets.