Make WordPress Core

Changes between Version 3 and Version 7 of Ticket #53142


Ignore:
Timestamp:
05/07/2021 06:10:28 PM (4 years ago)
Author:
sabernhardt
Comment:

Testing process

  1. Ideally, make the web.config file, root directory or .htaccess file unwritable. If that's not possible in your installation, adjust conditions within options-permalink.php to return true to force each error (see below).
  2. Navigate to Settings -> Permalinks.
  3. If you changed file/directory permissions, select a different permalink option and Save changes. (If conditions are forced, the error shows automatically.)
  4. Scroll down to find the error message.
  5. Check for a label with the read-only form element.

Ways to fake each situation

web.config is not writable

Replace the 3 consecutive conditional statements with true statements:

	if ( $iis7_permalinks ) :
		if ( isset( $_POST['submit'] ) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
			if ( file_exists( $home_path . 'web.config' ) ) :
root directory is not writable to edit/create web.config

Replace only the first 2 conditions with true statements (file_exists( $home_path . 'web.config' ) needs to remain false):

	if ( $iis7_permalinks ) :
		if ( isset( $_POST['submit'] ) && $permalink_structure && ! $using_index_permalinks && ! $writable ) :
.htaccess is not writable

Only replace this statement with a true condition:

	if ( $permalink_structure && ! $using_index_permalinks && ! $writable && $htaccess_update_required ) :

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #53142

    • Property Keywords has-screenshots commit added
    • Property Owner set to joedolson
    • Property Status changed from new to accepted
    • Property Milestone changed from Awaiting Review to 5.8
  • Ticket #53142 – Description

    v3 v7  
    1 When saving permalinks and files or the root directory are unwritable, the error message contains a read-only textarea without a label tag.
     1When saving permalinks, if the server configuration file or the root directory is unwritable, the error message contains a read-only textarea without a label tag.