[wp-trac] [WordPress Trac] #53142: Add labels for permalink settings error textareas
WordPress Trac
noreply at wordpress.org
Fri May 7 18:10:29 UTC 2021
#53142: Add labels for permalink settings error textareas
-------------------------------------+-------------------------------------
Reporter: sabernhardt | Owner: joedolson
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 5.8
Component: Permalinks | Version:
Severity: normal | Resolution:
Keywords: has-patch has- | Focuses: accessibility,
screenshots commit | administration
-------------------------------------+-------------------------------------
Old description:
> When saving permalinks and files or the root directory are unwritable,
> the error message contains a read-only textarea without a label tag.
New description:
When 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.
--
Comment (by sabernhardt):
==== 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. Select a different permalink option and Save changes.
4. 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 ) :
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53142#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list