Skip Navigation

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

Problem:

Image Map Pro is not working when WPML is active.

Solution:

Please check on the dashboard, and you will see a WPML banner “you can set profile language..” in the accounts with the issue. After closing this banner, the issue will be fixed.

100% of people find this useful.

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

Last updated by patrickV-3 1 year, 11 months ago.

Assisted by: Osama Mersal.

Author Posts
November 29, 2022 at 4:01 pm #12556529

patrickV-3

We're running into a issue where using Image Map Pro and WPML on the site is breaking the functionality of Image Map Pro. When the two plugins are activated image maps have an error loading and the Image Map Pro block doesn't work either.

I see this message in the console from Image Map Pro:

SyntaxError: Unexpected token 'I', "Invalid nonce" is not valid JSON
    at JSON.parse (<anonymous>)
    at Object.<anonymous> (image-map-pro-editor-storage-wordpress.js?ver=5.6.9:1:652)
    at c (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.1.1:2:28327)
    at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.1.1:2:29072)
    at l (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.1.1:2:80045)
    at XMLHttpRequest.<anonymous> (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.1.1:2:82499)

I've tested with a default WordPress theme and it is still broken. I also deactivated all plugins except for Image Map Pro and went through activating them one by one and it worked without any issues until I activated WPML where the error started occurring.

I also checked the compatibility page for Image Map Pro https://wpml.org/plugin/image-map-pro/ but it hasn't been tested in over four years.

November 30, 2022 at 7:16 am #12559995

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

Could you please log in to this sandbox site and upload the Image Maps plugin? (hidden link)

After that, please try to replicate the issue. If the issue is replicable, please let me know the steps to reproduce it to check it and consult our compatibility team.

Thanks for your cooperation

Regards,
Osama

November 30, 2022 at 3:15 pm #12564139

patrickV-3

I uploaded the plugin to the sandbox site and I am unable to recreate the issue that we are seeing on our site. I don't see any errors or anything in the console on the sandbox site so I wonder if the error is somewhere on our site then and not with the plugins.

November 30, 2022 at 3:24 pm #12564211

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

1) Could you please recheck the minimal environment on your site?

1- Deactivate all the plugins except WPML CMS and Image Map
2- Activate the Twenty Twenty-one theme
3- Check the issue

If the issue persists, please share screenshots of the error and where you see it.

2) It could be a configuration conflict issue on your site, so please compare the Image map settings, WPML-> Settings, and WPML-> Languages on the sandbox with your site.

Best regards,
Osama

November 30, 2022 at 4:07 pm #12564635

patrickV-3

1) I switched the theme to the Twenty Twenty-Two theme and have all plugins except for WPML active and it made no difference.
2) I get errors in the console when trying to save or load Image Maps when using the plugin. Everything else seems to work normally besides that.

console_errors.png
November 30, 2022 at 4:13 pm #12564677

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Please check the WordPress debug.log; this will allow us to see if any PHP errors are being produced. For more info, please check this page. (https://wordpress.org/support/article/debugging-in-wordpress/)

To enable it, open your wp-config.php file and look for the following line:

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 reproduce the issue 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!

Thanks,
Osama

November 30, 2022 at 5:22 pm #12565283

patrickV-3

I turned on debug for the staging site and the host by default keeps 7 days of logs. I do see a bunch of warnings for the staging site but I'm not 100% sure they're related to the plugin.

There was a large amount of string buffer overflow warnings and I do occasionally see warnings about reaching the max_children setting.

I added those warnings into a paste here https://pastebin.com/TWcSCauY

November 30, 2022 at 5:31 pm #12565337

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for the log. I'm not sure if these warnings are related to the issue.

However, I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
– preferably to a test site where the problem has been replicated if possible –
in order to be of better help and check if some configurations might need to be changed.

Your next answer will be private, which means only you and I can access it.
❌ Please backup your database and website ❌

✙ I would need your permission to de-activate and re-activate the Plugins and the Theme and change configurations on the site. This is also a reason the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

December 1, 2022 at 6:36 am #12567615

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for the access details. I've imported your map into the sandbox site, and it worked correctly without issue. Kindly check it on the sandbox site.

I suggest contacting the plugin support team to consult them regarding this issue. Please let us know their findings and if we can help fix the issue on your site.

Best regards,
Osama

December 1, 2022 at 3:58 pm #12572747

patrickV-3

I've checked the sandbox site and I can see that the Image Map loads correctly there. I've reached out to Image Map Pro support and all they've told me is that the plugins aren't compatible.

December 1, 2022 at 4:14 pm #12572847

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for your update. I've consulted our 2nd tier supporter regarding this issue, and I'll update you as soon as I get their reply.

Best regards,
Osama

December 2, 2022 at 3:08 pm #12579497

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for your patience. Could you please check if the Image Map works correctly on the staging site?

Best regards,
Osama

December 2, 2022 at 3:54 pm #12579743

patrickV-3

I went and checked the staging site and am still running into the same issue. I went and cleared site cache just in case but it made no difference.

December 2, 2022 at 3:57 pm #12579747

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

I can see the image correctly while WPML is activated. (Kindly check the attached screenshot)

Regards,
Osama

Capture.PNG
December 2, 2022 at 4:31 pm #12579835

patrickV-3

Thank you for the image. I've tried clearing browser cache and three different browsers and it didn't work in all three of them. I've tried Edge, Firefox and Opera GX with all of them getting the same error in the console.

I can see the Image Map on your sandbox site but it refuses to work for me on the staging site.