Background of the issue:
I'm using WordPress 6.7.2 and sitepress-multilingual-cms.4.7.0. Somewhere in a cron script, I'm getting an error related to WPML_Gutenberg_Config_Option being defined twice. A search shows it is defined in two places: wp-contentpluginssitepress-multilingual-cmsvendorwpmlpage-builders-gutenbergsrcclass-wpml-gutenberg-config-option.php and wp-contentpluginssitepress-multilingual-cmsaddonswpml-page-buildersclassesIntegrationsGutenbergclass-wpml-gutenberg-config-option.php. Neither of these files contain a namespace. I have recently taken over this project, so the error might be due to incorrect usage by the previous developer.
Symptoms:
PHP Fatal error: Uncaught TypeError: WPML\PB\Gutenberg\StringsInBlock\Base::__construct(): Argument #1 ($config_option) must be of type WPML_Gutenberg_Config_Option, WPML_Gutenberg_Config_Option given, called in /app/web/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Gutenberg/class-wpml-gutenberg-integration-factory.php on line 81 and defined in /app/web/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Gutenberg/strings-in-block/class-base.php:15
Questions:
Is it intended for WPML_Gutenberg_Config_Option to be defined in two places without a namespace?
Could the error be due to incorrect usage of WPML by the previous developer?
1.- I suspect the cause of this issue was a problem while updating because I can't find the first address mentioned. If you manually remove the sitepress-multilingual-cms folder from plugins and upload it manually (after downloading it from your wpml.org account) does the issue disappear?
2.- Please increase the WP memory Limit. Minimum requirements are 128Mb: https://wpml.org/home/minimum-requirements/
You can add this to wp-config.php to increase WP memory:`