Skip to content

v4.3.4 — Elementor → Gutenberg widget coverage hotfix

Choose a tag to compare

@coryhubbell coryhubbell released this 21 May 00:35
2ab3096

Why

A production agentic content-migration pipeline was producing unusable output from Elementor scrapes — empty paragraphs, lost structure, dropped settings. Root cause: the Gutenberg converter's type map covered only ~21 of the 90+ universal types the Elementor parser produces. Everything else (form, tabs, accordion, card, cta, counter, testimonial, pricing-table, alert, social-icons, slider, portfolio, countdown, map, progress, rating, nav, etc.) silently collapsed to core/paragraph with whatever scrap of content lived in $component->content — usually empty.

What changed

Both engines (PHP v3 and Python v4) now share the same widget dispatch.

  • Compound widgets (tabs, accordion, card / icon-box / image-box / flip-box, cta, counter, testimonial, pricing-table, alert) expand into a small group of native blocks — wrapped in core/group with a devtb-<type>-converted className so editors can spot and restyle them.
  • Marker fallback for widgets with no native Gutenberg equivalent (form, slider, countdown, portfolio, toc, map, progress, rating, unknown): preserved as core/html with a visible <!-- devtb: unconverted <framework> widget "<type>" --> annotation and a data-devtb-source marker. No silent data loss.
  • Type-map expansion for 1:1 mappings the parser already produced but the converter was missing — social-iconscore/social-links, navcore/navigation, blockquotecore/quote, iconcore/html, paragraphcore/paragraph.
  • Unknown-type fallback flipped from core/paragraph (the production-bug source) to the marker handler.
  • Content extraction in PHP add_block_content / generate_inner_html now reads the actual attribute names the Elementor parser produces (image_url/alt_text/url/youtube_url/wp_gallery/icon_list/author/heading/etc.), not just src/href/alt.
  • Settings denormalization (typography, color, spacing/padding/margin, border, alignment, anchor, className) added to the Python side — these were silently dropped before.
  • Four new transforms registered so the v4 CLI route is discoverable: elementor_to_gutenberg, html_to_gutenberg, divi_to_gutenberg, bricks_to_gutenberg.

Canonical WP serialization preserved from v4.2.0: core/ namespace stripping (<!-- wp:heading -->, not <!-- wp:core/heading -->), wp-block-heading class on headings, wp-element-button on buttons, has-alpha-channel-opacity on separators, core/list-item innerBlocks (WP 6.0+), column width as string-with-unit.

Validation

  • PHP: 200 / 200 framework conversion tests (3905 assertions) + 16 new widget-coverage tests (111 assertions) — all green across PHP 8.1 / 8.2 / 8.3 / 8.4 / 8.5.
  • Python: 125 tests — all green. TestGutenbergConverter grew from 5 to 21 tests, mirroring the PHP suite.
  • End-to-end smoke (tests/smoke_gutenberg_e2e.py against tests/fixtures/elementor/kitchen-sink.json — 30 widget types covering every dispatch class): both engines produce balanced delimiters, zero empty-paragraph collapses, the expected 9 marker fallbacks, and 20/20 sanity strings (titles, bodies, cites, image URLs) survive the round-trip.
  • The smoke is now a CI gate on every push and PR via the new Python tests + Gutenberg e2e smoke job.

Post-merge fidelity follow-up (folded into this release)

The e2e smoke caught two real PHP fidelity bugs the targeted unit tests didn't reach — both fixed before tagging:

  • Counter title was dropped. Elementor parser's normalize_settings() maps the widget title setting to the universal heading attribute. convert_counter() was reading $attrs['title'] only — now reads heading as the first fallback.
  • Blockquote author was dropped. generate_inner_html() core/quote cite-fallback chain didn't include $attrs['author'] (the parser passes that through unmapped). Now in the fallback chain.

What this release deliberately does NOT include

  • No new Gutenberg-as-source parser. Scope is moving content INTO Gutenberg, not pulling it OUT.
  • No new framework in the matrix. All 14 existing source frameworks unchanged.
  • No new Gutenberg IR layer. The architectural refactor toward a typed block tree (blockName/attrs/innerBlocks) is a future effort — this release closes the user-visible gap without changing the data model.

Migration

None required. Existing transforms unchanged. New transforms are additive.

Installation

  1. Download development-translation-bridge-4.3.4.zip below
  2. Upload to your WordPress themes directory
  3. Activate the theme

Requirements

  • WordPress 5.8+
  • PHP 8.1+
  • Python 3.9+ (only required for the v4 transform engine, optional)

Commits

  • 9358119 ci: wire Python tests + Gutenberg e2e smoke into CI (#12)
  • 02d132b fix(gutenberg): e2e smoke + fidelity follow-up for 4.3.4 (#11)
  • 4a65832 fix(gutenberg): 4.3.4 — Elementor widget coverage hotfix (no more empty paragraphs) (#10)

Full Changelog: v4.3.3...v4.3.4