Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing a PHP fatal error due to WPML_Gutenberg_Config_Option being defined twice in a WordPress environment using version 6.7.2 and sitepress-multilingual-cms.4.7.0. The error might stem from an incorrect update or usage by the previous developer.
Solution:
1. We recommend manually removing the

sitepress-multilingual-cms

folder from the plugins directory and then re-uploading it after downloading the latest version from your WPML.org account. This action should resolve the issue of the class being defined twice.
2. Increase the WordPress memory limit to at least 128MB, as recommended by WPML. You can do this by adding the following line to your

wp-config.php

file:

/* Memory Limit */<br />define('WP_MEMORY_LIMIT', '256M');

Ensure to place this code above the line /* That's all, stop editing! Happy blogging. */.
You can verify the updated memory limit in the WPML -> Support section of your WordPress dashboard.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should issues persist, please open a new support ticket at WPML support forum for further assistance.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 0 voices.

Last updated by Carlos Rojas 1 week, 2 days ago.

Assisted by: Carlos Rojas.

Author Posts
February 14, 2025 at 11:17 am #16705921

markusT-4

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?

February 14, 2025 at 11:52 am #16706140

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hello,
Thank you for contacting us

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:`

/* Memory Limit */
define('WP_MEMORY_LIMIT', '256M');

- Add it above the line /* That's all, stop editing! Happy blogging. */

You can double-check the WordPress memory limit in WPML -> Support

Regards,
Carlos