Any page containing a Cornerstone Form fails to load in the Cornerstone editor preview, returning a 500 error. The front-end renders correctly — this only affects the Cornerstone preview.
Environment:
- Pro Theme (latest version)
- Cornerstone 7.8+
- Cornerstone Forms (latest)
- WordPress (latest)
- SiteGround hosting
Error from debug.log:
PHP Warning: Undefined array key "_builder_atts" in
wp-content/plugins/cornerstone-forms/extension/Actions/Action.php on line 84
PHP Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in
wp-content/plugins/cornerstone-forms/extension/Actions/Action.php:84
The same error also occurs in ActionGroup.php on line 54.
Root cause:
Both Action.php (line 84) and ActionGroup.php (line 54) access $data['_builder_atts'] without checking if the key exists. When _builder_atts is not present in the data array, array_merge() receives null and throws a fatal error. This code only runs inside is_cornerstone_preview() , which is why the front-end is unaffected.
Temporary fix:
Changing $data['_builder_atts'] to $data['_builder_atts'] ?? [] on both lines resolves the issue. This falls back to an empty array instead of passing null to array_merge() .
Could this null check be added in the next plugin update so the fix persists?