Skip to content

WPML does not extract Accordion Item titles for translation #2968

Description

@pirate-bot

Summary

Otter Accordion Item titles remain in the source language when an accordion is translated through WPML, even though the item content can be translated. WPML is expected to expose the title text with the rest of the block’s translatable content. Instead, translated FAQ sections can display source-language headings above translated answers, producing mixed-language content.

Customer context

Product / area: Otter Blocks, Accordion Item block
Version: Not provided; the inspected checkout is immediately after v3.2.1
Environment: WordPress site with multilingual WooCommerce product content
Integration / third party: WPML
Reported error / symptom: Six accordion titles remained in German while their answers appeared in French
Impact: Published FAQ sections can contain mixed-language headings and answers

Reproduction notes

  1. Create an Otter Accordion containing source-language titles and answer content.
  2. Translate the containing product or post through WPML.
  3. Observe whether WPML exposes both the Accordion Item title and nested answer content for translation.

Reported result: answers were translated, while six titles remained in German on the French content. Repository inspection confirms the distinct attribute storage and missing project-supplied WPML declaration; runtime reproduction was not performed.

Diagnosis

Conclusion

Static repository inspection confirms that Accordion Item headings are stored in the custom title block attribute, while the repository contains no WPML Gutenberg-block declaration for extracting that key. This matches the reported result in which WPML translates nested answer content but leaves titles in the source language. The support transcript independently identifies the same missing registration. A live WPML runtime reproduction was not performed.

Where this likely occurs

  • User-visible surface: WPML translation of themeisle-blocks/accordion-item headings.
  • src/blocks/blocks/accordion/item/block.json — block metadata, lines 4 and 11–14: declares themeisle-blocks/accordion-item and its string title attribute without translation integration metadata.
  • src/blocks/blocks/accordion/item/edit.jsEdit lines 33–37 and 74–82: reads the heading from attributes.title and writes edits back to that attribute.
  • src/blocks/blocks/accordion/item/save.jsSave lines 10–24: renders attributes.title separately from nested block content.
  • src/blocks/test/performance/assets/large-post.html — serialized Accordion fixture lines 3167–3172: records the title in block-comment JSON while answer text is nested paragraph content.
  • Repository-wide inspection found no wpml-config.xml or WPML Gutenberg-block declaration. Commit f61503f9 moved the type-only declaration into block.json; the inspected checkout is v3.2.1-1-g2d284542, where the same storage path remains.

Engineering notes

The inspected path is the free Otter Accordion Item block in Codeinwp/otter-blocks; no Pro override was implicated. The title and answer use different serialization paths: the heading is a custom parent-block attribute, while answer content resides in inner blocks. That boundary is consistent with WPML exposing one text surface but not the other. WPML’s extraction internals were not available in the workspace, so their behavior is supported by the ticket and repository integration gap rather than local dependency-source inspection.

Test coverage status

src/blocks/test/e2e/blocks/accordion.spec.js, suite Accordion Block, lines 11–82 covers insertion, default items, and frontend expansion. src/blocks/test/performance/assets/large-post.html lines 3167–3172 covers the serialized shape as fixture data. No relevant WPML, multilingual extraction, or translated-title coverage was found during inspection.

What to verify or explore next

  • May be worth reproducing with the ticket’s WPML workflow on the inspected Otter version and recording whether the title key appears in WPML’s translation editor.
  • May be worth verifying both newly created accordions and existing serialized accordions after translation content is rescanned.
  • If reproducible, checking the Accordion e2e suite alongside a WPML integration scenario would clarify the affected version range.

Unknowns / follow-up

  • The customer’s exact Otter and WPML versions were not provided.
  • The customer acknowledged the workaround instructions but did not report whether applying the custom WPML XML declaration resolved the titles.

Confidence

Confidence: 94/100

The Otter repository stores Accordion Item headings in a custom block attribute but supplies no WPML extraction declaration, matching the ticket’s mixed-language FAQ symptom; no existing GitHub issue was found. The Neve Individual Layout report was rejected as a product defect because the inspected shortcode flow intentionally accepts a canonical layout ID and maps it to the active WPML translation during rendering.


Source: HelpScout #3411325395
Generated by bug-report-triage (ID: bug-report-triage_6a75acc07c1715.19967967)

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions