Skip Navigation

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

Problem:
The client was unable to activate the WPML Multilingual CMS plugin after an update, as it triggered a fatal error.

Solution:
1. We recommended checking if the WP Memory Limit is set to at least 128M. This can be done by adding the following code to the

wp-config.php

file before the 'Happy publishing' line:

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

2. We noticed a fatal error in the debug log related to WooCommerce Multilingual. We advised following the configuration wizard and setting up WooCommerce Multilingual, referring to the documentation for a known issue:
WooCommerce Multilingual fatal error documentation.

3. If issues persisted, we suggested creating a minimal setup by:
- Switching to a default WordPress theme
- Disabling all plugins
- Activating the WPML and WooCommerce Multilingual (WCML) plugins first
- Then, activating the rest of the plugins one by one and switching back to the original theme.

We also emphasized the importance of having a full backup of the website before making any changes to prevent data loss.

If this solution does not seem relevant, please open a new support ticket with us.

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 5 replies, has 2 voices.

Last updated by Marsel Nikolli 1 year, 2 months ago.

Assisted by: Marsel Nikolli.

Author Posts
November 15, 2023 at 12:50 pm #14808475

frankB-33

WPML Multilingual CMS plugin could not be activated because it triggered a fatal error.

Tell us what you are trying to do?
Try to activate WPML Multilingual CMS plugin after update.

Is there any documentation that you are following?
No

Is there a similar example that we can see?
No

What is the link to your site?
hidden link

November 15, 2023 at 2:11 pm #14809557

Marsel Nikolli

Hi,

Thank you for contacting WPML Support, I will be happy to help you today.

In order to expedite handling your support request please provide me the WordPress debug.log, that will allow to see if any PHP errors are being produced.
More Info: https://wordpress.org/support/article/debugging-in-wordpress/

* To enable debug.log, open your wp-config.php file and look for:

define('WP_DEBUG', false);

And change it to:

define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings which is recommended on a live site.
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

Then try to activate the WPML Multilingual CMS plugin and check if any errors were saved to the debug.log log file inside the “.../wp-content/” directory.

If you can paste your debug.log to https://pastebin.com/ and provide me with that link, it would be great!

Looking forward to your reply,
Marsel

November 15, 2023 at 4:46 pm #14819045

frankB-33

Here is my log:

[15-Nov-2023 16:42:12 UTC] WordPress database error Unknown column 'inclusive_language_score' in 'field list' for query UPDATE `wp_yoast_indexable` SET `object_id` = '39087', `object_type` = 'post', `object_sub_type` = 'page', `permalink` = 'hidden link', `primary_focus_keyword_score` = NULL, `readability_score` = '0', `inclusive_language_score` = '0', `is_cornerstone` = '0', `is_robots_noindex` = NULL, `is_robots_nofollow` = '0', `is_robots_noimageindex` = NULL, `is_robots_noarchive` = NULL, `is_robots_nosnippet` = NULL, `open_graph_image` = NULL, `open_graph_image_id` = NULL, `open_graph_image_source` = NULL, `open_graph_image_meta` = NULL, `twitter_image` = NULL, `twitter_image_id` = NULL, `twitter_image_source` = NULL, `primary_focus_keyword` = NULL, `canonical` = NULL, `title` = NULL, `description` = NULL, `breadcrumb_title` = 'Shop', `open_graph_title` = NULL, `open_graph_description` = NULL, `twitter_title` = NULL, `twitter_description` = NULL, `estimated_reading_time_minutes` = '1', `author_id` = '1', `post_parent` = '0', `number_of_pages` = NULL, `post_status` = 'publish', `is_protected` = '0', `is_public` = NULL, `has_public_posts` = NULL, `blog_id` = '1', `schema_page_type` = NULL, `schema_article_type` = NULL, `object_last_modified` = '2022-08-11 07:35:46', `object_published_at` = '2021-09-01 15:06:32', `version` = '2', `permalink_hash` = '25:b0f5cefa4ee8176fa71fa76fe589489e', `updated_at` = '2023-11-15 16:42:12' WHERE `id` = '1378' made by require_once('wp-admin/admin-footer.php'), do_action('admin_print_footer_scripts'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->enqueue_asset_data, Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->execute_lazy_data, Automattic\WooCommerce\Internal\Admin\WCAdminSharedSettings->Automattic\WooCommerce\Internal\Admin\{closure}, apply_filters('woocommerce_admin_shared_settings'), WP_Hook->apply_filters, Automattic\WooCommerce\Internal\Admin\Settings->add_component_settings, WP_REST_Users_Controller->get_current_item, WP_REST_Users_Controller->prepare_item_for_response, WP_REST_Controller->add_additional_fields_to_object, Yoast\WP\SEO\Routes\Yoast_Head_REST_Field->for_author, Yoast\WP\SEO\Actions\Indexables\Indexable_Head_Action->for_author, Yoast\WP\SEO\Actions\Indexables\Indexable_Head_Action->with_404_fallback, Yoast\WP\SEO\Surfaces\Values\Meta->get_head, Yoast\WP\SEO\Surfaces\Values\Meta->create_html_presentation, Yoast\WP\SEO\Presenters\Schema_Presenter->present, Yoast\WP\SEO\Presenters\Schema_Presenter->get, Yoast\WP\SEO\Presentations\Abstract_Presentation->__get, Yoast\WP\SEO\Presentations\Indexable_Presentation->generate_schema, Yoast\WP\SEO\Generators\Schema_Generator->generate, Yoast\WP\SEO\Generators\Schema_Generator->generate_graph, Yoast\WP\SEO\Generators\Schema\Breadcrumb->generate, Yoast\WP\SEO\Presentations\Abstract_Presentation->__get, Yoast\WP\SEO\Presentations\Indexable_Presentation->generate_breadcrumbs, Yoast\WP\SEO\Generators\Breadcrumbs_Generator->generate, Yoast\WP\SEO\Repositories\Indexable_Repository->find_by_id_and_type, Yoast\WP\SEO\Repositories\Indexable_Repository->upgrade_indexable, Yoast\WP\SEO\Builders\Indexable_Builder->build, Yoast\WP\SEO\Builders\Indexable_Builder->save_indexable, Yoast\WP\SEO\Models\Indexable->save, Yoast\WP\Lib\Model->save, Yoast\WP\Lib\ORM->save, Yoast\WP\Lib\ORM::execute
[15-Nov-2023 16:42:43 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_current_language() on null in /var/www/clients/client64/web85/web/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-cached-converter.php:18
Stack trace:
#0 /var/www/clients/client64/web85/web/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/filters/class-wpml-lang-domain-filters.php(56): WPML_URL_Cached_Converter->convert_url()
#1 /var/www/clients/client64/web85/web/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/filters/class-wpml-lang-domain-filters.php(61): WPML_Lang_Domain_Filters->{closure}()
#2 /var/www/clients/client64/web85/web/wp-includes/class-wp-hook.php(324): WPML_Lang_Domain_Filters->upload_dir_filter_callback()
#3 /var/www/clients/client64/web85/web/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#4 /var/www/clients/client64/web85/web/wp-includes/functions.php(2385): apply_filters()
#5 /var/www/clients/client64/web85/web/wp-content/plugins/wp-optimize/cache/class-wpo-cache-config.php(255): wp_upload_dir()
#6 /var/www/clients/client64/web85/web/wp-content/plugins/wp-optimize/cache/class-wpo-cache-config.php(50): WPO_Cache_Config->get_defaults()
#7 /var/www/clients/client64/web85/web/wp-content/plugins/wp-optimize/cache/class-wpo-cache-config.php(64): WPO_Cache_Config->get()
#8 /var/www/clients/client64/web85/web/wp-content/plugins/wp-optimize/cache/class-wpo-page-cache.php(1417): WPO_Cache_Config->get_option()
#9 /var/www/clients/client64/web85/web/wp-includes/class-wp-hook.php(324): WPO_Page_Cache->cron_schedules()
#10 /var/www/clients/client64/web85/web/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#11 /var/www/clients/client64/web85/web/wp-includes/cron.php(1115): apply_filters()
#12 /var/www/clients/client64/web85/web/wp-includes/cron.php(247): wp_get_schedules()
#13 /var/www/clients/client64/web85/web/wp-content/plugins/sitepress-multilingual-cms/sitepress.php(164): wp_schedule_event()
#14 /var/www/clients/client64/web85/web/wp-admin/includes/plugin.php(2318): include_once('...')
#15 /var/www/clients/client64/web85/web/wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()
#16 /var/www/clients/client64/web85/web/wp-admin/plugins.php(58): activate_plugin()
#17 {main}
thrown in /var/www/clients/client64/web85/web/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-cached-converter.php on line 18
[15-Nov-2023 16:42:59 UTC] PHP Deprecated: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/clients/client64/web85/web/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php on line 19
[15-Nov-2023 16:42:59 UTC] PHP Deprecated: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/clients/client64/web85/web/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php on line 19
[15-Nov-2023 16:43:10 UTC] PHP Deprecated: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/clients/client64/web85/web/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php on line 19
[15-Nov-2023 16:43:10 UTC] PHP Deprecated: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/clients/client64/web85/web/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php on line 19

November 15, 2023 at 5:23 pm #14819317

Marsel Nikolli

Thank you for providing the debug.log content.

1) I would first suggest to check if the WP Memory Limit is set at least to the minimum required by WPML (128M), to do so you can check the following code in your wp-config.php file right before the line:

/* That's all, stop editing! Happy publishing. */:

check for code similar to the one below and replace it with:

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

2) From the debug.log I saw that you get:

Fatal error: Uncaught Error: Call to a member function get_source_language_code()

please make sure to follow the configuration wizard and setup WooCommerce Multilingual:
- https://wpml.org/errata/woocommerce-multilingual-fatal-error-uncaught-error-call-to-a-member-function-get_source_language_code-on-bool/

* After, if you still have issues, can you please share a video of the issue so we can get a better idea of what goes wrong?

Let me know how it goes,
Marsel

November 16, 2023 at 7:27 am #14822333

frankB-33

Hello,

The WP Memory Limit are already set as suggested. So this should not cause the problem.
Unfortunately I can not run the configuration wizard because the Plugin will not run at all.

To be honest, I do not see the benefit of making a video. When I try to activate the WPML Multilingual CMS plugin I get the following error message: WPML Multilingual CMS plugin could not be activated because it triggered a fatal error.

November 16, 2023 at 9:01 am #14823191

Marsel Nikolli

Hi,

Thank you for the update, would it be possible to try check further by switching to a minimal setup, meaning:
- switch to a default WP theme
- disable all the plugins
- try activating the WPML plugins and WCML plugins first

If the WPML / WCML plugins do activate successfully then proceed activating the rest of the plugins one-by-one and switching to the correct theme.

Note: Please make sure you have a full backup (files & database) of your website before trying anything in order to prevent any possible data loss.

Looking forward to your reply,
Marsel

November 16, 2023 at 9:40 am #14823819

frankB-33

Now it runs again, but I didn't find a conflicting plugin or theme.
- First disable all plugins
- Change to default theme
- Activate WPML Multilingual CMS plugin
- Activate all other plugins one by one
- Change to the right theme

Now everything seems to be working. It seems that the activation order of the plugin is important.... I'm not happy about it, but let's hope it works stably now.