WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#4199 closed defect (bug) (fixed)

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

Reported by: filosofo Owned by: 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 8 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 @filosofo8 years ago

  • Keywords has-patch added

comment:2 @Nazgul8 years ago

  • Keywords commit added

comment:3 @rob1n8 years ago

  • Owner changed from anonymous to rob1n

Looks good. +1.

comment:4 @rob1n8 years ago

  • Status changed from new to assigned

comment:6 @rob1n8 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.