Skip Navigation

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

Problem:
Fatal error when editing Languages

Solution:
Actually, the problem was coming due to "Site is Moved or Copied" message on top of the page. Since it is a staging site, I selected "This is a copy of my original site" and saved.

Relevant Documentation:
- https://wpml.org/documentation/translating-your-contents/advanced-translation-editor/using-advanced-translation-editor-when-you-move-or-use-a-copy-of-your-site/
- https://wpml.org/documentation/automatic-translation/using-automatic-translation-with-custom-languages/

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.

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by matthiasV-21 2 years, 1 month ago.

Assisted by: Waqas Bin Hasan.

Author Posts
February 20, 2023 at 5:02 pm #13072699

matthiasV-21

I am trying to: Edit languages

Link to a page where the issue can be seen: hidden link

I expected to see: Successful saving of Languages params.

Instead, I got: Fatal error: Uncaught Error: Call to undefined method WP_Error::filter() in /wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php:202 Stack trace: #0 [internal function]: WPML\FP\Fns::WPML\FP\{closure}(Object(Closure), Object(WP_Error)) #1 /wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(152): call_user_func_array(Object(Closure), Array) #2 [internal function]: WPML\FP\{closure}(Object(WP_Error)) #3 /wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(48): call_user_func_array(Object(Closure), Array) #4 /wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(105): WPML\FP\{closure}(Object(WP_Error)) #5 /wp-content/plugins/sitepress-multilingual-cms/menu/edit-languages.php(1364): WPML\FP\Lef in /wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php on line 202

February 21, 2023 at 11:22 am #13078337

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

Before proceeding further, may I ask you to try the following?

IMPORTANT: Take full backup of your website and database beforehand. It is highly advised to try the following on a staging/dev site first, so your live website isn't compromised.

- Deactivate all plugins except WPML and its addons and check for the issue.
- Activate each plugin one-by-one, while keeping check on the issue after a plugin is activated. This way you'll be able to pinpoint a plugin having a conflict (or problem), if any.
- If the problem persists, repeat the above steps with a default theme of WordPress (i.e. 2023).
- Also check the browser's console for any JavaScript errors. If you find any, copy that in your next reply. See https://wordpress.org/support/article/using-your-browser-to-diagnose-javascript-errors/ for details on how to find these errors.

If none of the above mentioned helps resolving or pinpointing the problem, also try the followings by using one of your preferred method to reinstall WPML plugins:

Steps to reinstall plugins manually from Plugins page:

1) Deactivate existing WPML plugins
2) Delete WPML plugins
3) Download latest versions from https://wpml.org/account/downloads/
4) Upload using Plugins -> Add New -> Upload
5) Activate

Steps to reinstall plugins manually via FTP:

1) Deactivate existing WPML plugins.
2) Connect to your site via FTP and browse to the /wp-content/plugins/ folder.
3) Delete WPML plugins folders.
4) Download the latest versions from https://wpml.org/account/downloads/.
5) Unzip the downloaded files in separate folders, usually when you unzip the file, it creates a folder with the name of the plugin, with zip file's content extracted into it.
6) Upload the extracted (unzipped) folder via FTP, to the /wp-content/plugins/ folder.
7) Go to WP Admin -> Plugins and Activate.

Please let me know if this helps resolve the issue. Or I'll try my best to further assist you on the matter.

Regards.

February 22, 2023 at 4:32 pm #13091127

matthiasV-21

Nothing has changed after these actions.

February 23, 2023 at 6:44 am #13094939

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

May I ask for admin access to your website to check the issue in detail? You can create a separate admin user for this purpose, which can be deleted afterwards.

Also provide following detail to investigate/observe the issue:

- detailed steps to reproduce the issue
- links to pages in admin and on frontend
- screenshots or screen recording if needed to explain
- any other relevant information to observe/investigate the issue

Remember to take full backup of your website and database before proceeding. However, a staging/test site is highly recommended, because I may need to try some changes/fixes on the site, which may cause conflicts with the live site otherwise. Please confirm it in your next reply or let me know if you do not agree with the mentioned.

I've set your next reply as private to share this information safely.

IMPORTANT: If you don't see the section for providing access information, do not write in the message box or the information may appear as public.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

Before continuing on the site, I'll also need your confirmation and approval on each of the followings:

1) Is this a Live/Production or Staging/Dev site?
2) Is it OK to work on this site?
3) Is it OK to try some changes/fixes on the site and/or activate/deactivate/install a plugin on the site, which may cause conflicts with the other parts of the site?
4) Have you taken full backup of your website and database?

Please confirm, thanks.

February 23, 2023 at 10:33 am #13097139

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for providing the access and confirmations. I was able to see and fix the problem.

Actually, the problem was coming due to "Site is Moved or Copied" message on top of the page. Since it is a staging site, I selected "This is a copy of my original site" and saved.

After that page reloaded itself and most of the languages had their mappings, except the custom ones. So I simply saved and it went fine, means no fatal error.

See following guides for details:

- https://wpml.org/documentation/translating-your-contents/advanced-translation-editor/using-advanced-translation-editor-when-you-move-or-use-a-copy-of-your-site/
- https://wpml.org/documentation/automatic-translation/using-automatic-translation-with-custom-languages/

Please check and confirm.

Regards.