Changes between Initial Version and Version 1 of Ticket #45970
- Timestamp:
- 01/13/2019 10:34:19 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #45970 – Description
initial v1 3 3 The code responsible for this check is located in \wp-admin\includes\misc.php (line 748) 4 4 5 {{{ 5 6 // First check if the rule already exists as in that case there is no need to re-add it 6 7 $wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]'); 7 8 if ( $wordpress_rules->length > 0 ) 8 9 return true; 10 }}} 9 11 10 12 The fix could be to register the namespace: 11 13 14 {{{ 12 15 $xpath->registerNamespace("x", "http://schemas.microsoft.com/.NetConfiguration/v2.0"); 16 }}} 13 17 14 and then in $xpath->query to check also for /x:configuration/x:system.webServer/x:rewrite/x:rules/x:rule[starts-with(@name,\'WordPress\')]18 and then in `$xpath->query` to check also for `/x:configuration/x:system.webServer/x:rewrite/x:rules/x:rule[starts-with(@name,\'WordPress\')]` 15 19 16 20 In this way it works without problem and does not break the site.