Bỏ qua điều hướng

Resolved

Reported for: WPML Multilingual 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.

Workaround

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.

21 phản hồi đẾN “WPML 4.5.9 - Widgets are shown in all languages if Classic Widgets plugin is enabled”

  1. Hi there,

    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?

    • Hey there,
      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.

  2. 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.

    Commeting out:
    `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.