Hi @vmarko,
thank you for your commitment.
Yes, I’m checking the correct .htaccess file. I suspect the rules disappeared because the .htaccess file was accidentally overwritten. So the missing rules shouldn’t be a bug in your plugin.
However, it would be nice if your plugin catches the errors in such a case and gives you the opportunity to restore the rules.
When I visit the page you suggested (Performance > Install) I get more errors. One of them is new:
[07-Mar-2023 08:54:59 UTC] PHP Warning: Undefined variable $rewrite_rules in /www/www.example.com/public/wp-content/plugins/w3-total-cache/BrowserCache_Environment.php on line 97
[07-Mar-2023 08:54:59 UTC] PHP Warning: foreach() argument must be of type array|object, null given in /www/www.example.com/public/wp-content/plugins/w3-total-cache/BrowserCache_Environment.php on line 160
[07-Mar-2023 08:54:59 UTC] PHP Warning: Undefined variable $other_areas in /www/www.example.com/public/wp-content/plugins/w3-total-cache/inc/options/common/header.php on line 372
[07-Mar-2023 08:54:59 UTC] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /www/www.example.com/public/wp-content/plugins/w3-total-cache/inc/options/common/header.php:372
Stack trace:
#0 /www/www.example.com/public/wp-content/plugins/w3-total-cache/inc/options/common/header.php(372): count()
#1 /www/www.example.com/public/wp-content/plugins/w3-total-cache/inc/options/install.php(8): require('...')
#2 /www/www.example.com/public/wp-content/plugins/w3-total-cache/Generic_Page_Install.php(28): include('...')
#3 /www/www.example.com/public/wp-content/plugins/w3-total-cache/Base_Page_Settings.php(71): W3TC\Generic_Page_Install->view()
#4 /www/www.example.com/public/wp-content/plugins/w3-total-cache/Root_AdminMenu.php(289): W3TC\Base_Page_Settings->options()
#5 /www/www.example.com/public/wp-includes/class-wp-hook.php(308): W3TC\Root_AdminMenu->options()
#6 /www/www.example.com/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#7 /www/www.example.com/public/wp-includes/plugin.php(517): WP_Hook->do_action()
#8 /www/www.example.com/public/wp-admin/admin.php(259): do_action()
#9 {main}
thrown in /www/www.example.com/public/wp-content/plugins/w3-total-cache/inc/options/common/header.php on line 372
What I tried to restore the rules:
- Deactivate and activate the Plugin. Didn’t help.
- Changed various settings to force the plugin to re-modify the .htaccess. Didn’t help.
- Run the Setup Guide again. Didn’t help.
- Disabled and enabled the Browser Cache to force the plugin to re-modify the .htaccess. Didn’t help.
Again as a summary to avoid misunderstandings:
- We are talking about the standard .htaccess file, which is located in the root directory of the WordPress installation.
- This .htaccess file should have the file permission “644”.
- This .htaccess file should contain a few rules created by your plugin.
Are these statements correct?
Is there a way to force the plugin to create the rules?