Zum Inhalt springen Zur Seitenleiste springen

Resolved by author

Resolved in: Ultimate Addons for Elementor Version 1.37.0.1

Topic Tags: Compatibility

Overview of the issue

When using the Content Toggle widget from the Ultimate Addons for Elementor plugin, translated Elementor templates are not displayed correctly when using the Advanced Translation Editor (ATE). Instead of showing the translated template, the widget displays the original language content on the translated page.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open your theme’s functions.php file.
  • Add the following snippet:
    // WPML: Workaround for compsupp-7677
    add_filter('elementor/frontend/before_render', 'wpml_compsupp7677_translate_content_toggle');
    
    function wpml_compsupp7677_translate_content_toggle($element) {
        if (!class_exists('SitePress') || 'uael-content-toggle' !== $element->get_name()) {
            return;
        }
    
        $settings = $element->get_settings();
        $keys_to_convert = [
            'section_content_',
            'saved_pages_', 
            'section_saved_rows_'
        ];
    
        $modified = false;
        foreach ($keys_to_convert as $key) {
            for ($i = 1; $i <= 2; $i++) {
                $setting_key = $key . $i;
                
                if (isset($settings[$setting_key]) && is_numeric($settings[$setting_key])) {
                    $post_type = get_post_type($settings[$setting_key]);
                    
                    if ($post_type) {
                        $settings[$setting_key] = apply_filters(
                            'wpml_object_id',
                            $settings[$setting_key],
                            $post_type,
                            true
                        );
                        $modified = true;
                    }
                }
            }
        }
    
        if ($modified) {
            $element->set_settings($settings);
        }
    }
    

4 Antworten zu “Ultimate Addons for Elementor - Content Toggle Widget Not Displaying Translated Templates”

  1. Hi,

    We have attempted to replicate the issue using the reported widget on our testing environment, but we are currently unable to reproduce the problem. We confirmed that we can successfully use the Content Toggle and translate it with the Advanced Translation Editor (ATE).

    To help us accurately escalate this issue to our development team, could you please provide us with more specific information?

    Direct Link: A link to the specific page on your website where the issue is occurring.

    Accurate Setup Details: Any additional details about your setup that might be unique (e.g., specific widget settings, translation method used).

    We look forward to your further details so we can investigate this thoroughly.

  2. Hi Nicolas,

    I’m checking in on the status of this ticket. Since the topic is still open, we’d really like to get to the bottom of this and would appreciate your help in moving forward.

    As we haven’t been able to replicate the issue on our side yet, could you please set up a fresh staging environment where the issue is visible? Having a clean reproduction site will allow us to verify the bug and provide our developers with the exact data they need to build a fix.

    Looking forward to your update!

    • Hi Sushma,

      I reinstalled the package we had and updated all plugins. It seems that your team already fixed that issue.
      – Open ultimate-elementor/modules/content-toggle/widgets/content-toggle.php
      – Line 134 you’ll see that the workaround we provided has been implemented already
      // WPML compatibility for Content Toggle section content.
      ...

      I’ll close this erratum and our internal ticket. Thanks!

Hinterlasse eine Antwort

Bitte bleibe beim Thema und sei respektvoll zu anderen. Wenn du Hilfe bei Problemen benötigst, die nicht mit diesem Beitrag zusammenhängen, nutze unser Support-Forum, um einen Chat zu starten oder ein Ticket einzureichen.

Du kannst diese Tags verwenden:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>