Fresh install – Warning: preg_match() Warning: Cannot modify header information
Quote from wmcoyne on August 9, 2021, 5:18 pmI just performed a fresh install. The website is new, few plug-ins, just created a day ago. I’m using WordPress + WooCommerce. Storefront Theme. Installed Asgaros plugin and did not change any settings yet.
The below error appears only on the forum page at the top:
Warning: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 1 in /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php on line 223
Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php:223) in /home/customer/www/tornethos.com/public_html/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher_Helper.php on line 79
I’ve seen similar errors in other posts here, but the people posting are not posting a clear resolution of the problem. Something to do with links? I am not able to follow how this was fixed for other people.
Edit 1:
I just went to Permalinks and changed to Plain, save. Back to Postname, save.
I am still seeing the same error as the admin logged in. In incognito mode I see a different error:
: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 1 in /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php on line 223
Edit 2:
I am using Siteground and they include an optimizer caching plugin by default. I excluded the forum page and purged the cache. Now in Admin and anonymous viewing I see the below error:
Warning: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 1 in /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php on line 223
I also found some new errors which are caused by the following actions:
Clicking on the “Forum” button in the top left corner causes a white page to load with only the following error.
Warning: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 1 in /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php on line 223
Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php:223) in /home/customer/www/tornethos.com/public_html/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher_Helper.php on line 79
Is this looking more like it is caused by the siteground (sg) caching plugin? I can exclude specific pages, but perhaps other urls are being accessed I have not excluded? I am only excluding the forum page and any sub-pages. /forum and /forum/*
I’ve tried disabling plugins and trying again, but it does not seem to make any difference.
Thank you
I just performed a fresh install. The website is new, few plug-ins, just created a day ago. I’m using WordPress + WooCommerce. Storefront Theme. Installed Asgaros plugin and did not change any settings yet.
The below error appears only on the forum page at the top:
Warning: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 1 in /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php on line 223
Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php:223) in /home/customer/www/tornethos.com/public_html/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher_Helper.php on line 79
I’ve seen similar errors in other posts here, but the people posting are not posting a clear resolution of the problem. Something to do with links? I am not able to follow how this was fixed for other people.
Edit 1:
I just went to Permalinks and changed to Plain, save. Back to Postname, save.
I am still seeing the same error as the admin logged in. In incognito mode I see a different error:
: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 1 in /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php on line 223
Edit 2:
I am using Siteground and they include an optimizer caching plugin by default. I excluded the forum page and purged the cache. Now in Admin and anonymous viewing I see the below error:
Warning: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 1 in /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php on line 223
I also found some new errors which are caused by the following actions:
Clicking on the “Forum” button in the top left corner causes a white page to load with only the following error.
Warning: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 1 in /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php on line 223
Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/tornethos.com/public_html/wp-includes/class-wp.php:223) in /home/customer/www/tornethos.com/public_html/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher_Helper.php on line 79
Is this looking more like it is caused by the siteground (sg) caching plugin? I can exclude specific pages, but perhaps other urls are being accessed I have not excluded? I am only excluding the forum page and any sub-pages. /forum and /forum/*
I’ve tried disabling plugins and trying again, but it does not seem to make any difference.
Thank you
Quote from qualmy91 on August 10, 2021, 1:06 pmHey @wmcoyne,
Did you read my post here:
https://asgaros.com/support/topic/warnings-after-defining-user-groups/#postid-17362
This warning (not an error!) can be caused by a trashed page with a forum shortcode. I’ve already fixed it and it will probably be fixed with the next update of Asgaros Forum.
Hey @wmcoyne,
Did you read my post here:
https://asgaros.com/support/topic/warnings-after-defining-user-groups/#postid-17362
This warning (not an error!) can be caused by a trashed page with a forum shortcode. I’ve already fixed it and it will probably be fixed with the next update of Asgaros Forum.
Quote from wmcoyne on August 10, 2021, 2:22 pmThank you for the reply. I can confirm I did have a trashed page with a shortcode in it.
The plugin automatically creates a forum page when it is installed which I did not notice. The first thing I did was create my own page using the short code. The #1 Google search result for “wordpress forum plugin” (or something similar) has installation instructions for your plugin that tells the user to create their own page using the shortcode. This is probably applicable to an older version but now causes the user to break their own plugin as a result.
I realize this is a warning and not an error, but some pages are rendering completely white/blank with warnings at the top and the main page is rendering with a php warning. For me (and most people I would imagine) this is not acceptable for a production environment.
I deleted the extra trashed page with the shortcode permanently. Uninstalled the plugin, reinstalled the plugin and the warning persists. I also went to the permalinks page and saved as “plain links” and then re-saved using “post name” (my default).
Edit:
The warning is gone! I had purged the caches but there was still a 5-10 minute delay before the warning went away. At the very least the steps above document exactly what I did to fix the issue. I also do not seem to be getting any blank pages anymore, but I will report back after I have played around with it more. I have not yet configured anything or done much.
NB: I have the siteground sg optimizer plugin and under the supercacher tab I excluded the following pages:
/forum/
/forum/*Thank you!
Thank you for the reply. I can confirm I did have a trashed page with a shortcode in it.
The plugin automatically creates a forum page when it is installed which I did not notice. The first thing I did was create my own page using the short code. The #1 Google search result for “wordpress forum plugin” (or something similar) has installation instructions for your plugin that tells the user to create their own page using the shortcode. This is probably applicable to an older version but now causes the user to break their own plugin as a result.
I realize this is a warning and not an error, but some pages are rendering completely white/blank with warnings at the top and the main page is rendering with a php warning. For me (and most people I would imagine) this is not acceptable for a production environment.
I deleted the extra trashed page with the shortcode permanently. Uninstalled the plugin, reinstalled the plugin and the warning persists. I also went to the permalinks page and saved as “plain links” and then re-saved using “post name” (my default).
Edit:
The warning is gone! I had purged the caches but there was still a 5-10 minute delay before the warning went away. At the very least the steps above document exactly what I did to fix the issue. I also do not seem to be getting any blank pages anymore, but I will report back after I have played around with it more. I have not yet configured anything or done much.
NB: I have the siteground sg optimizer plugin and under the supercacher tab I excluded the following pages:
/forum/
/forum/*
Thank you!
