Skip to content

fix: ea wpml accordion media type translation#815

Open
ZebaAfiaShama wants to merge 1 commit into
WPDevelopers:devfrom
ZebaAfiaShama:fix/zeba-wpml-ea-accordion-media-type-translation
Open

fix: ea wpml accordion media type translation#815
ZebaAfiaShama wants to merge 1 commit into
WPDevelopers:devfrom
ZebaAfiaShama:fix/zeba-wpml-ea-accordion-media-type-translation

Conversation

@ZebaAfiaShama

@ZebaAfiaShama ZebaAfiaShama commented May 22, 2026

Copy link
Copy Markdown

Affected version: 6.6.5
Severity: Low

Summary

The EA Accordion widget's media type fields (image/video) were not being properly registered for WPML translation in the wpml-config.xml file. This caused media-related content in the Accordion widget to not appear in the WPML String Translation panel, preventing translators from translating or syncing media across languages.

Reproduction (before fix)

  1. Install WPML and Essential Addons for Elementor
  2. Add an EA Accordion widget to a page with media type (image/video) set
  3. Go to WPML → String Translation
  4. Notice the Accordion widget's media type fields are missing from the translation list

Fix

Updated wpml-config.xml to correctly include the EA Accordion widget's media type fields under the proper <node> configuration, ensuring WPML can detect and register them for translation.

Test plan

  1. Install WPML and Essential Addons for Elementor
  2. Add an EA Accordion widget with media type (image/video) content
  3. Go to WPML → String Translation
  4. Confirm the Accordion media type fields now appear and can be translated
  5. Switch language and verify media translation is applied correctly

Here's a comprehensive test plan for your WPML Advanced Accordion fix:


TEST PLAN: WPML Translation Fix for Advanced Accordion Media Type Field

Overview

This test plan verifies that the Advanced Accordion widget properly registers its media type fields for WPML translation, allowing language switching to work correctly. It also documents the caching behavior with old pages.

Prerequisites

  • WordPress site with WPML plugin installed and configured
  • Multiple languages enabled (e.g., English, Dutch, German)
  • Essential Addons for Elementor (latest dev version with the fix) installed
  • Elementor page builder active
  • Access to WordPress admin and front-end

Test Scenario 1: New Pages with Fixed Plugin (Expected: PASS)

Objective: Verify that newly created pages with the Advanced Accordion widget properly support WPML translation.

Steps:

  1. Create a new Elementor page
  2. Add an Advanced Accordion widget to the page
  3. Add accordion items with:
    • Title: "Test Accordion Title (English)"
    • Content: "Test accordion content in English"
  4. Add at least one Media Type accordion item with:
    • Tab Title: "Media Tab (English)"
    • Media content (image or video)
  5. Publish the page
  6. Go to WPML > Translations and translate the page to Dutch and German
  7. Translate all accordion fields:
    • Tab titles
    • Tab content
    • Media tab titles
    • Media tab content
  8. Clear any caches (Elementor, WPML, browser)
  9. Visit the page front-end and switch language using language switcher
  10. Verify accordion content displays in the selected language for:
    • Regular accordion items (titles and content)
    • Media type accordion items (titles and content)

Expected Result: ✅ All accordion content switches correctly to the selected language without displaying English text.


Test Scenario 2: Old Pages Before Fix (Expected: FAIL without duplication)

Objective: Demonstrate the caching issue with pages created before the plugin fix was uploaded.

Steps:

  1. Note: These should be pages created and published BEFORE uploading the dev version of the plugin
  2. Visit an old accordion page on the front-end
  3. Switch language using the language switcher
  4. Observe the accordion content behavior

Expected Result: ❌ Accordion content remains in English even after switching language. WPML has cached the old widget configuration that lacked the media type field registration.

Why This Happens:

  • Old pages were created when the plugin didn't properly register media type fields with WPML
  • WPML cached the widget structure in its database
  • Simply updating the plugin doesn't refresh WPML's cached data for existing pages
  • The widget data in the database doesn't match the new field structure

Test Scenario 3: Fix for Old Pages Using EA Duplicator (Expected: PASS)

Objective: Verify that duplicating old pages resolves the WPML caching issue.

Prerequisite: Have at least one old page with the accordion widget (from before the fix)

Steps:

  1. Go to the old accordion page in WordPress admin
  2. Use one of these methods to duplicate the page:
    • Option A: Use Essential Addons Duplicator (if available) - look for duplicate/copy option in the page actions
    • Option B: Use WordPress native "Duplicate Post" functionality
    • Option C: Go to the page, edit URL to change post type, use Elementor's duplicate feature
  3. Give the duplicated page a new title (e.g., "Old Page - Fixed")
  4. Publish the new duplicated page
  5. Wait 2-3 seconds for WPML to re-scan the page structure
  6. Go to WPML > Translations and check the new page
  7. You should see prompts to translate the accordion fields (they will appear as new strings)
  8. Translate all accordion content to Dutch and German
  9. Clear all caches:
    • Elementor cache
    • WPML cache
    • Browser cache (Ctrl+Shift+Delete or Cmd+Shift+Delete on Mac)
  10. Visit the duplicated page on front-end
  11. Switch language using language switcher
  12. Verify accordion content displays in selected language

Expected Result: ✅ The duplicated page now correctly displays accordion content in the selected language. The fix works as intended.

Why Duplication Works:

  • When a page is duplicated, it's saved as a new post
  • The new post triggers re-registration of all widget fields with WPML
  • The updated plugin properly registers media type fields this time
  • WPML's database cache is refreshed for this new post ID

Pass/Fail Criteria

PASS:

  • ✅ New pages with accordion widget translate correctly
  • ✅ Old pages show translation issue (demonstrating the problem)
  • ✅ Old pages work correctly after duplication
  • ✅ WPML configuration shows all accordion fields registered
  • ✅ All language switches work without errors
  • ✅ Media type fields are translatable
  • ✅ No console errors or 404s

FAIL:

  • ❌ New pages don't support accordion field translation
  • ❌ Duplication doesn't fix old page issue
  • ❌ Language switching shows incomplete translations
  • ❌ WPML doesn't recognize media type fields
  • ❌ JavaScript errors in console when switching languages

Notes for QA

  1. Browser Cache: Always clear browser cache between major tests
  2. WPML Cache: Clear WPML cache after plugin updates
  3. Elementor Cache: Go to Elementor > Settings > Performance and clear all caches
  4. Screenshots: Document before/after language switches for reference
  5. Known Issue: Pages created before the fix require duplication to work properly - this is expected behavior due to WPML's caching mechanism
  6. Duplication Method: EA Duplicator or WordPress native "Duplicate Post" plugin both work

Build artifacts

N/A

@ZebaAfiaShama ZebaAfiaShama changed the title fix: zeba ea wpml accordion media type translation fix: ea wpml accordion media type translation May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant