Navigation überspringen

Dies ist das technische Support-Forum für WPML – das mehrsprachige WordPress-Plugin.

Mitlesen können alle, doch nur WPML-Kunden können hier Fragen veröffentlichen. Das WPML-Team antwortet im Forum an 6 Tagen pro Woche, 22 Stunden am Tag.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Zeitzone des Supporters: Europe/Zagreb (GMT+02:00)

Schlagwörter: 

Dieses Thema enthält 3 Antworten, hat 0 Stimmen.

Zuletzt aktualisiert von Bruno Kos Vor 3 Tage, 13 Stunden.

Assistiert von: Bruno Kos.

Autor Beiträge
Juni 30, 2025 um 11:35 am

montagmorgens

Hintergrund des Themas:
I am trying to update the domain name in the language switcher settings for a Multisite setup with a main instance running at ebrain.space and subdomains like demo.ebrain.space. All subdomains have an issue where the username is appended to all URLs in the language switch. I suspect WPML thinks the language switch is between different domains and appends the username to sync data cross-domain. When I click the button 'Update domain name in language switcher settings', I encounter a PHP error. The error message is: 'Domain name update has been failed'. The PHP error details are:

[30-Jun-2025 11:02:29 UTC] PHP Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/LsTemplateDomainUpdater.php:37
Stack trace:
#0 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/LsTemplateDomainUpdater.php(37): method_exists()
#1 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/LsTemplateDomainUpdater.php(65): WPMLLanguageSwitcherLsTemplateDomainUpdater->WPMLLanguageSwitcher{closure}()
#2 [internal function]: WPMLLanguageSwitcherLsTemplateDomainUpdater->WPMLLanguageSwitcher{closure}()
#3 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(151): array_map()
#4 [internal function]: WPMLFPFns::WPMLFP{closure}()
#5 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array()
#6 [internal function]: WPMLFPFns::WPMLFP{closure}()
#7 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array()
#8 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/LsTemplateDomainUpdater.php(76): WPMLFPFns::__callStatic()
#9 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/LsTemplateDomainUpdater.php(13): WPMLLanguageSwitcherLsTemplateDomainUpdater->runUpdate()
#10 [internal function]: WPMLLanguageSwitcherLsTemplateDomainUpdater->run()
#11 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/auryn/lib/Executable.php(42): ReflectionMethod->invokeArgs()
#12 [internal function]: WPMLAurynExecutable->__invoke()
#13 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/auryn/lib/Injector.php(641): call_user_func_array()
#14 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/container/class-wpml-container.php(110): WPMLAurynInjector->execute()
#15 [internal function]: WPMLContainerContainer::execute()
#16 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array()
#17 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Maybe.php(106): WPMLFP{closure}()
#18 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/ajax/Factory.php(38): WPMLFPJust->map()
#19 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPMLAjaxFactory->WPMLAjax{closure}()
#20 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(257): WPMLFPRight->map()
#21 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(24): WPMLFPRight->chain()
#22 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(30): WPMLFPPromise->resolve()
#23 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(30): WPMLFPPromise->resolve()
#24 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(30): WPMLFPPromise->resolve()
#25 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(30): WPMLFPPromise->resolve()
#26 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(30): WPMLFPPromise->resolve()
#27 /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wp/classes/Hooks.php(50): WPMLFPPromise->resolve()
#28 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(324): WPMLLIBWPHooks::WPMLLIBWP{closure}()
#29 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#30 /opt/bitnami/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
#31 /opt/bitnami/wordpress/wp-admin/admin-ajax.php(192): do_action()
#32 {main}
thrown in /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/LsTemplateDomainUpdater.php on line 37

Die Symptome:
The error message 'Domain name update has been failed' appears when attempting to update the domain name in the language switcher settings. A PHP Fatal error occurs: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /opt/bitnami/wordpress/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/LsTemplateDomainUpdater.php:37.

Fragen:
How can I resolve the PHP error when updating the domain name in the language switcher settings?
Why is the username being appended to all URLs in the language switch?

Juni 30, 2025 um 12:34 pm
Juli 1, 2025 um 11:45 am #17188299

Bruno Kos
WPML-Unterstützer seit 12/2018

Sprachen: Englisch (English ) Deutsch (Deutsch ) Französisch (Français )

Zeitzone: Europe/Zagreb (GMT+02:00)

Could you please remove the `wpml_disabled_switcher_template_objects` option in the database? You can do this via phpMyAdmin or a similar tool:

1. Go to the `wp_options` table.
2. Search for the option name: `wpml_disabled_switcher_template_objects`.
3. If it exists, try deleting it.

This can help reset the language switcher template and resolve any related issues. Let me know once it’s done and if this helped.

Juli 7, 2025 um 9:41 am #17207501

montagmorgens

The option entry doesn't exist in our database. Any other solution?

Juli 7, 2025 um 12:06 pm #17208524

Bruno Kos
WPML-Unterstützer seit 12/2018

Sprachen: Englisch (English ) Deutsch (Deutsch ) Französisch (Français )

Zeitzone: Europe/Zagreb (GMT+02:00)

Can you provide me with a site Duplicator package? As we will need to debug this.

https://wpml.org/faq/checklist-before-opening-a-ticket-in-wpml-support/#get-help-from-support

Please exclude all the media files, etc, to keep the package minimal. Let me know if that would not be possible so we can see about a different way to debug this.