Hi!
I just inherited the administration of a website. My first task was to update Wordpress, X and Cornerstone to the latest stand, something I did today. However, every time I try to open any page to edit in Cornerstone, even when I try creating a new one, I get the well-known error message:
The preview could not load due to the iframe response being incomplete. This is most often related to a plugin conflict, or customizations introducing a PHP error.
Following your troubleshooting guide, I
- deactivated all plug-ins except for cornerstone, and the problem persisted,
- ensure the PHP memory limit was set at 512M,
- checked my PHP version (it is 7.4.33), and
- finally activated the PHP debug mode.
After the final step, I found the following lines in my error log:
PHP Notice: Undefined variable: condition_text_decoration_is_line_through_or_underline in .../cornerstone/includes/config/theme-option-controls.php on line 83
PHP Notice: Undefined variable: condition_text_decoration_is_underline in .../cornerstone/includes/config/theme-option-controls.php on line 85
PHP Notice: Undefined variable: condition_text_decoration_is_line_through_or_underline in .../cornerstone/includes/config/theme-option-controls.php on line 86
PHP Notice: Undefined variable: condition_text_decoration_is_line_through_or_underline in .../cornerstone/includes/config/theme-option-controls.php on line 87
I checked the affected file, theme-option-controls.php, and noticed that the conditions are indeed not defined in it. I compared this file to the similar file theme-option-standalone-controls.php, and noticed that the second one includes a block of definitions ate the beginning of the file, before the return [ command:
$condition_text_decoration_is_line_through_or_underline = [ 'key' => 'a_text_decoration_line', 'op' => 'IN', 'value' => ['line-through', 'underline'] ];
$condition_text_decoration_is_underline = [ 'key' => 'a_text_decoration_line', 'op' => 'IN', 'value' => ['underline'] ];
I felt like those two lines are missing in the theme-option-controls.php file. So I went and added them. It did not fix the issue, I am still unable to edit any page and keep getting the same error message, but no more PHP errors are reported to my log.
Without errors in the log, I am unable to track the possible issue and ran out of ideas. I would love it if you could give me a hand here.
Thanks!