Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#4199 closed defect (bug) (fixed)

Saving general options when WP_SITEURL is defined can really screw things up

Reported by: filosofo's profile filosofo Owned by: rob1n's profile rob1n
Milestone: 2.2 Priority: high
Severity: critical Version: 2.2
Component: Administration Keywords: home, siteurl, options, has-patch commit
Focuses: Cc:

Description

If you've defined WP_HOME or WP_SITEURL in your wp-config.php file, then the home and siteurl fields under Options > General become disabled.

At least in Firefox, that means that if you update any of the other options on that page, WP will set the home and siteurl options in the database to NULL, which makes WP think the site has not been setup yet, requiring a database edit to straighten things out.

My attached patch removes home or siteurl from the page_options field when they are defined by WP_HOME or WP_SITEURL.

Attachments (1)

wp-admin_options-general.php.diff (897 bytes) - added by filosofo 18 years ago.

Download all attachments as: .zip

Change History (7)

#1 @filosofo
18 years ago

  • Keywords has-patch added

#2 @Nazgul
18 years ago

  • Keywords commit added

#3 @rob1n
18 years ago

  • Owner changed from anonymous to rob1n

Looks good. +1.

#4 @rob1n
18 years ago

  • Status changed from new to assigned

#6 @rob1n
18 years ago

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

(In [5395]) Don't set URL options if WP_HOME and or WP_SITEURL are defined. Props filosofo. fixes #4199

Note: See TracTickets for help on using tickets.