Back to Community

Troubleshooting Common Page Builder by SiteOrigin PHP Errors

55 threads Sep 10, 2025 PluginPage builder by siteorigin

Content

Users of the Page Builder by SiteOrigin plugin sometimes encounter PHP errors that can disrupt their website's functionality or admin area. These errors are often related to specific server configurations, plugin conflicts, or outdated software. This guide outlines the most common PHP errors and provides steps to resolve them.

1. Fatal Error: Can't use function return value in write context

Error Message Example: Fatal error: Can't use function return value in write context in .../siteorigin-panels/inc/styles.php on line 67

Why it happens: This error occurs on servers running very old, unsupported versions of PHP (below 5.6). The plugin code uses a syntax that is not compatible with these outdated PHP versions.

Solution: The most effective and recommended solution is to update your server's PHP version. WordPress itself recommends using PHP 7.4 or higher. Contact your web hosting provider for assistance upgrading your PHP version. This not only resolves the error but also significantly improves your site's security and performance.

2. Error: Cannot use string offset as an array

Error Message Example: Uncaught Error: Cannot use string offset as an array in .../siteorigin-panels/siteorigin-panels.php:568

Why it happens: This is typically caused by corrupted or invalid page layout data that the plugin attempts to process.

Solution: A recent plugin update may have introduced a fix for the underlying data issue. Ensure your Page Builder by SiteOrigin plugin is updated to the latest version. If the error persists after updating, you may need to identify and repair the specific page or post with the corrupted layout data.

3. TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given

Error Message Example: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in .../admin-widget-dialog.php:204

Why it happens: This error suggests a code incompatibility, often arising after a plugin update. A function is expecting an array but is receiving a string instead.

Solution: This type of error is usually patched quickly by the development team. Check for and install any available updates for the Page Builder by SiteOrigin plugin. If no update is available, temporarily switching to a default WordPress theme (like Twenty Twenty-One) can help determine if your theme is causing a conflict.

4. PHP Warnings and Notices (Undefined index)

Error Message Example: PHP Notice: Undefined index: cell_index in .../renderer-legacy.php on line 136 or Notice: Undefined index: background_image_attachment_fallback in .../styles-admin.php on line 389

Why it happens: These are not fatal errors but rather warnings and notices that appear when WP_DEBUG is enabled. They occur when the code tries to access an array key that does not exist.

Solution: For a live website, these warnings should be hidden from visitors. You can disable debug mode by setting WP_DEBUG to false in your wp-config.php file. These notices are often addressed in subsequent plugin updates, so keeping the plugin updated is the long-term solution.

5. Admin AJAX 500 Errors or Blank White Screens

Symptoms: Unable to save posts/pages, a blank white screen appears in the admin, or a 500 Internal Server Error occurs when trying to edit content.

Why it happens: This can have many causes, including a server-level firewall (ModSecurity) blocking a request, a memory limit exhausted, or a fatal PHP error that is not being displayed.

Solution:

  • Enable Debugging: Enable WP_DEBUG in your wp-config.php file to reveal any hidden fatal errors that are causing the white screen.
  • Check for Conflicts: Deactivate all other plugins and switch to a default theme. If the problem is resolved, reactivate them one-by-one to identify the conflicting software.
  • Check Server Error Logs: Contact your hosting provider to check the server's error logs for any specific ModSecurity or PHP errors that may not be visible in WordPress.
  • Increase Memory Limit: Try increasing the PHP memory limit by adding define('WP_MEMORY_LIMIT', '256M'); to your wp-config.php file.

General Best Practices

  • Keep Everything Updated: Always keep WordPress, your theme, and all plugins, including Page Builder by SiteOrigin, updated to their latest versions to benefit from bug fixes and security patches.
  • Use a Supported PHP Version: Run your site on a actively supported PHP version (7.4 or higher). This is the single most effective way to prevent many common errors.
  • Test in a Staging Environment: Before applying updates or changing PHP versions on your live site, test them on a staging or development copy of your website to avoid unexpected downtime.

If you continue to experience issues after trying these steps, detailed error messages from your debug log are the most helpful information for further troubleshooting.

Related Support Threads Support