Reported for: WPML多语CMS 4.5.9
Resolved in: 4.5.10
Overview of the issue
If you are using Classic Widgets plugin, you will notice that when you add a widget and you use the Display on language feature to display it only in one language, it will be visible in all languages.
We have currently released WPML 4.5.10 which should solve this issue.
Please, don’t hesitate to make a full backup of your site first and then update your WPML plugin as explained on this tutorial.
I have the same problem, but I don’t have the plugin “Classic Widgets” installed.
Have you tried the workaround here provided? If this does not help, please open a ticket in our support forum as it may be a different issue and we need to investigate it.
Yes, I tried the workaround, but it didn’t help (the footer with the widgets wasn’t showing up at all). I opened a ticket for it.
Thank you Christoph. Indeed, it seems like a possible different situation or a variation of this one.
Thank you for reporting it!
The problem has not been resolved
We will release a new update soon with this fix. In the meantime, please try the workaround here provided.
I’ve 5 websites using AVADA theme. All of them having the same problem of showing widgets in 2 languages.
Can you please provide the download link of (4.5.10-b.1) ?
I’ve this problem with 6 websites using AVADA theme.
If you can’t update your WPML from your Dashboard as explained here, you can download it from your WPML account.
All fine now. The problem is solved with the beta version. Thanks.
I’m glad it helped. Thank you for your feedback! 🙂
Thank you – the beta version seems to work for my website.
We are glad it helped!
Thank you for your feedback. 🙂
Beta version doesn’t resolve my problem!
Hope your next update will be ok. Downgraded the plugin. Websites are working again…
If our beta version does not solve the issue, please open a ticket in our support forum as we will need to investigate it.
It would be great if you can share the ticket link here as well. 🙂
Thank you for your help.
Knowing I have backups, and knowing how to use them, if necessary, I updated to the beta version on a live site and it seems to have fixed this problem, and has not created any others that I can see. But, your own documentation strongly suggests not to do that: “Additionally, you should not use beta releases on live, production sites.”
So what do you suggest, roll back to 4.5.8 or install the beta 4.5.10-b.1?
Thank you for your feedback. So far, this beta version has been pretty stable. However, you are totally right and it’s not ideal to use it for productions site.
In your case, both options are valid, if you can easily rollback to 4.5.8, that would be the safer choice, however if you haven’t encounter any issue with the beta, you can keep it.
We hope to have a new release soon although we can’t provide you and ETA so far.
I suppose if the only fix/change in this particular beta version is this widget problem I think it is safe. It’s when a beta version has countless yet to be fully tested new features, one might want to only install it on a staging site.
So for those that want to know, I for one have still not noticed any issues with version 4.5.10-b.1, except that it did in fact fix the widget problem.
Widgets (blocks) with 4.5.9 and 4.5.10-b.1 have additional `p` and `br` tags.
Example widget: WC blocks mini cart. The widgets are set to display on all languages.
`add_filter( ‘widget_block_content’, [ $this, ‘filterByLanguage’ ], – PHP_INT_MAX, 1 );`
in `sitepress-multilingual-cms/classes/widgets/class-wpml-widgets-support-frontend.php` L30 solves it for now.
I’m leaving it commented out and expecting 4.5.10 release to overwrite it with correct implementation.
Also don’t use PHP_INT_MIN/MAX in filters, just use a reasonable number. Leave MIN/MAX for the end users, making it harder to fix the mess otherwise.
Thank you for your report, however I’ve tried to reproduce it on my end without luck. Could you please open a ticket in our support forum so we can better investigate this situation?
Thank you for your helo.
This issue should have been solved with WPML 4.5.10.
Don’t hesitate to make a full backup of you site before proceeding.