Skip to content Skip to sidebar

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

Problem:
When using the WPML plugin with the Bricks theme active, clicking the 'Scan now and adjust links' button in the WPML > Settings under 'Update internal links' does not initiate the scan. Instead, a JavaScript error appears in the browser console indicating an issue with the wpml-tm-mcs-translate-link-targets.js script.
Solution:
We identified that the issue is specific to the interaction between the WPML plugin and the Bricks theme. As a temporary workaround, modify the JavaScript file located at sitepress-multilingual-cms/res/js/mcs/wpml-tm-mcs-translate-link-targets.js. Replace the line

const self = this

with

const self = {}

. This change was tested and confirmed to resolve the issue on a staging environment. Our development team is working on a permanent fix to be included in a future release.

Please note that this solution might become outdated or may not apply to your specific situation. If this workaround does not resolve your issue, or if you encounter other problems, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If necessary, please open a new support ticket 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.

Tagged: ,

This topic contains 9 replies, has 1 voice.

Last updated by Dražen 1 month, 1 week ago.

Assisted by: Dražen.

Author Posts
June 18, 2026 at 6:48 pm #18113170

Stéphane

Background of the issue:
On WPML > Settings, in the "Update internal links" section ("Adjust links in posts and strings so they point to the translated content"), clicking the "Scan now and adjust links" button does not trigger anything. No scan starts, no progress indicator, and no error notice appears in the UI.

Symptoms:
The browser console throws this error the instant the button is clicked:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'prop')
at HTMLButtonElement.run (wpml-tm-mcs-translate-link-targets.js?ver=495000:17:17)
at HTMLButtonElement.dispatch (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,wp-hooks&ver=7.0:2:40035)
at v.handle (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,wp-hooks&ver=7.0:2:38006)

The error comes from WPML's own script (wpml-tm-mcs-translate-link-targets.js), but only occurs when the Bricks theme is active (isolation below).

Steps I took to isolate (minimal setup test):
1. Deactivated ALL plugins except WPML Multilingual CMS and WPML String Translation, with the Bricks theme active.
2. With Bricks active, the error occurs and the button does not work.
3. Switched the active theme to Twenty Twenty-Five (v1.5), keeping the same minimal plugin set (WPML + String Translation only).
4. With Twenty Twenty-Five active, the button works correctly — the scan runs and there is no console error.
5. Switched back to Bricks — the error returns.

So the conflict is isolated to the Bricks THEME. Note: Bricks is a theme (not a plugin), so it cannot be tested as an active plugin alongside a different theme — the only valid comparison is Bricks-as-theme vs. a default theme, which is what I did above.

Other things I tried that did NOT help:
- Deactivating LiteSpeed Cache (my only cache layer) — no effect.
- Increasing WP_MEMORY_LIMIT — no effect (so this does not appear to match the memory-limit cause from your earlier known cases).

Environment:
- WordPress: 7.0 (console trace shows ver=7.0 scripts)
- PHP: 8.3
- Hosting: xCloud (LiteSpeed server)
- Theme: Bricks 2.3.7 (the theme that triggers the issue); default-theme comparison used Twenty Twenty-Five 1.5
- WPML Multilingual CMS: 4.9.5
- WPML String Translation: 3.5.3
- Other active WPML components (not relevant to repro, listed for completeness): WPML SEO 2.2.5, ACF Multilingual 2.2.4, Gravity Forms Multilingual 1.8.5, Media Translation 3.1.2

I can provide temporary admin access or a staging clone to reproduce if helpful. I've also attached my WPML debug log. Let me know what else you need.

June 18, 2026 at 8:04 pm #18113277

Stéphane

Second issue on the same site (same Bricks + WPML stack) — likely related:

I just translated images set via WPML Media Translation on some different pages. Some did work, but some other do not display on the FR page. The FR page keeps showing the original (EN) image.

The image in question is an Image element placed directly in the Bricks editor.

Here is a page where it worked:
hidden link
hidden link

Here is a page where it didn't work:
hidden link
hidden link

What I have already verified / ruled out:
- In WPML > Media Translation, the FR image itself is correctly assigned to the original (not just alt/title text).
- "Translate media library texts with posts" / automatic media detection is enabled.
- I made a small change to the original (default-language) page (added a space), updated it, and re-ran the FR translation in the ATE to 100%. The FR page still shows the EN image.
- Full cache purge done: object cache (Redis, via `wp cache flush`) AND LiteSpeed page cache, then tested in a private/incognito window. No change — still the EN image.
- Server resources are not a factor (plenty of free RAM/CPU, no memory pressure).

Given this, it looks like it may match the known erratum "Bricks Theme — Translated Content Not Showing on Frontend" (the includes/ajax.php fix). Could you confirm whether that erratum still applies to Bricks 2.3.7, or whether a permanent fix is already included and something else is going on here?

Environment (same as the link-scan issue reported above):
- WordPress: 7.0
- PHP: 8.3
- Hosting: xCloud (LiteSpeed server, Redis object cache)
- Theme: Bricks 2.3.7
- WPML Multilingual CMS: 4.9.5
- WPML String Translation: 3.5.3
- WPML Media Translation: 3.1.2

June 19, 2026 at 4:31 pm #18115609

Juan de Paco
Supporter

Hello, Stéphane

Thanks for the detailed report and for your patience. I am first going to try to verify the first issue about the console error and eventually report it to the development team.

Then, I will get back to the second problem. Regarding your question, the errata about missing translated content in the frontend should be fixed Bricks 1.11 so it is unlikely that this is the same issue, but we will check for sure.

I will keep you posted on my findings.

June 19, 2026 at 10:46 pm #18115827

Stéphane

Ok, thanks !

June 23, 2026 at 6:04 am #18120046

Dražen
Supporter

Languages: English (English )

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

Hello,

I'll be taking over this ticket and will continue assisting you from here.

To keep the conversation clear and easier to follow, we generally handle one issue per ticket. Let's first focus on the original issue you reported regarding the "Scan Now" button and the error message. Once we've resolved that, we can continue investigating the other issues in a separate ticket if needed.

I tried reproducing the problem on my end but wasn't able to, which suggests it may be specific to your website or its content. I'll need to investigate it further.

Could you please provide access to your staging site so I can log in and take a closer look?

I've enabled a private reply for your next response, so you can safely share the access details there.

Thanks!

Regards,
Dražen

June 24, 2026 at 6:51 am #18122703

Dražen
Supporter

Hello,

Thanks for getting back to me.

I checked the issue, and it appears to be related to the Bricks theme. I also tried reproducing it on a clean WordPress installation, but I was not able to get the same "Scan Now" button to appear.

I've now escalated the case to our 2nd Tier team for further investigation and advice.

Please note that it may take a day or two for them to review the issue. I'll update you as soon as I have any news.

Kind regards,
Dražen

June 24, 2026 at 8:34 am #18122946

Dražen
Supporter

Hello,

please try next workaround also on your live website while our developers will work on permanent fix for next version.

In the file sitepress-multilingual-cms/res/js/mcs/wpml-tm-mcs-translate-link-targets.js

Replace const self = this with const self = {} and it should work fine as it is in staging.

Let me know how it goes.

Regards,
Drazen

June 30, 2026 at 12:51 pm #18133477

Stéphane

Hi Drazen,

Yes, it works now, thanks !

So for the second request (concerning the images that sometime don't translate), can we that here or do I open another ticket ?

June 30, 2026 at 1:34 pm #18133659

Stéphane

Finally,

I solved the images translation problem. The problem seemed to be me ! 😉

Thanks for your help

June 30, 2026 at 1:40 pm #18133664

Dražen
Supporter

Hello Stéphane,

That's great news! I'm glad to hear you were able to resolve the image translation issue as well.

Thank you for letting me know.

Since both issues have now been resolved, I'll go ahead and close this ticket. If you run into any other questions or issues in the future, please don't hesitate to open a new ticket—we'll be happy to help.

Have a great day!

Kind regards,
Dražen