Skip Navigation

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

Problem:
The client was experiencing an issue where the 'Translate Link Targets' button in the WPML settings was not functioning, accompanied by a JavaScript TypeError in the console indicating a null property read. This issue persisted even after disabling all plugins except WPML.
Solution:
We first recommended increasing the WP Memory Limit to at least 128MB, ideally 256MB, by adding the following lines to the wp-config.php file:

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

Add these lines before:

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

Afterwards, we suggested switching to a default theme like Twenty Twenty-One and enabling only WPML and String Translation plugins to check if the issue was caused by a theme conflict. If the problem was resolved, the client was advised to reactivate other plugins one by one to identify the problematic plugin.
If these steps did not resolve the issue, we requested temporary access to the client's site for further investigation.

Please note that this solution might be outdated or not applicable to your specific case. 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. If the problem persists, please open a new support ticket at WPML support forum.

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 3 replies, has 1 voice.

Last updated by marcoA-2 4 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
November 24, 2024 at 10:16 am #16436893

marcoA-2

Background of the issue:
I am trying to use the Translate Link Targets button in the WPML settings, but it is not working. I have disabled all plugins except WPML to troubleshoot the issue.

Symptoms:
The Translate Link Targets button in settings is not working.
Console log error:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'prop') at HTMLButtonElement.run (wpml-tm-mcs-translate-link-targets.js?ver=4.6.14:17:17) at HTMLButtonElement.dispatch (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,wp-hooks&ver=6.7.1:2:40035) at v.handle (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,wp-hooks&ver=6.7.1:2:38006)

Questions:
Why is the Translate Link Targets button not working?
How can I resolve the TypeError in the console log?

November 24, 2024 at 8:46 pm #16437596

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi,

Thank you for contacting WPML support. While you wait for one of my colleagues to take this ticket and work on it, let me provide you with the first debugging steps or see if I can help with the issue quickly.

The debug info you attached shows that your server WP Memory Limit is 40M. Our recommendations are to have the following as minimal requirements:

- PHP 7 and above (this OK with your installation) with a WP Memory Limit of at least 128MB while 256MB is recommended.

MySQL 5.6 and above.

Please follow this link for detailed documentation:

https://wpml.org/home/minimum-requirements/

Is it possible for you to change those to the minimum requirement?

You may need to contact your hosting provider for that. Meeting those baseline requirements is critical before debugging and sometimes solves issues you experience. The most important thing is to raise the WP Memory Limit. Please try to raise it before you contact your hosting company. You can do it from the wp-config.php file in your WordPress installation. Insert this code in that file:

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

Add it before this line:

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

Could you please perform that procedure and see if it helps?

Regards,
Itamar.

November 27, 2024 at 10:49 am #16448698

marcoA-2

nothing is change..
clicking on the button do nothing, console error:

wpml-tm-mcs-translat…ts.js?ver=4.6.14:17 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'prop')
at HTMLButtonElement.run (wpml-tm-mcs-translat…js?ver=4.6.14:17:17)
at HTMLButtonElement.dispatch (load-scripts.php?c=0…s&ver=6.7.1:2:40035)
at v.handle (load-scripts.php?c=0…s&ver=6.7.1:2:38006)



November 28, 2024 at 7:45 am #16453235

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
I hope you're doing well.

I have taken over this ticket and will try my best to assist you in this matter.

From the error log you've shared, I identified the file name and checked it locally. It appears that the properties being passed to the props function are null, which is causing the issue. The null value could be a result of a conflict between the theme and plugins. Could you please check what happens when you switch to a default theme like Twenty Twenty-One and enable only the WPML and String Translation plugins on your site?

If that solves the issue, start activating them one by one and after activating each, check if the issue reappears. In this way, you'll be able to pinpoint the root cause of the issue.

But, if the issue persists, a closer inspection will be required to understand the root cause of the issue.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

November 28, 2024 at 2:21 pm #16455701

marcoA-2

Ok thanks, the probem was the Bricks theme!