Repository navigation
Description
🧪 Visualizer on WordPress 7.2-RC2: the chart block is empty in the post editor and its chart picker crashes
In the post and page editor, the Visualizer chart block draws nothing, and opening its "Display an existing chart" picker turns the block into "This block has encountered an error and cannot be previewed". This started with WordPress 7.1, which always puts the post editor in an iframe, and it is unchanged on 7.2-RC2. The front end, the widgets editor and the classic editor still show charts.
On WordPress 7.0 (before the iframe change): the three chart blocks on the test page draw in the editor, the picker shows drawn previews, and a picked chart is kept after saving and shows on the front end.
On WordPress 7.1.5 (current release) and 7.2-RC2: none of the three blocks draws; the DataTable block shows "This block has encountered an error"; the picker crashes the block as it opens; the console logs Uncaught (in promise) Error: The container #reactgooglegraph-<n> is not defined. for each preview.
| Link | WordPress | Bot check |
|---|---|---|
| WordPress 7.0 | 7.0.9 (Playground's 7.0) | ✅ Works: on 2026-11-04, 7.0.8 drew 3 of 3 blocks in Playground and in wp-env; not rechecked today |
| Current release | 7.1.5 | ❌ Fails (wp-env today): 0 of 3 blocks drawn, picker crash |
| New build | 7.2-RC2 (Playground's beta channel, checked today) | ❌ Fails (wp-env today): 0 of 3 blocks drawn, picker crash |
Setup: each link installs Visualizer 4.0.11 from wordpress.org with Twenty Twenty-One and seeds 16 charts (ids 8201-8216) and page 9002 "QA Visualizer blocks" with three chart blocks, then opens that page in the editor. Tools → QA Logs shows debug.log.
Try: look at the three chart blocks in the editor, then add a new Visualizer block, choose "Display an existing chart", and compare 7.0 with 7.1.5 or 7.2-RC2.
Without Visualizer: not applicable, it is Visualizer's own block. The block is registered with API version 1 and no block.json; since 7.1 the post editor is iframed even for such blocks, and the block's Google Charts previews look for their container in the outer page, not in the editor iframe. So this is Visualizer's to fix.
Local reproduction: wp-env on 7.1.5 with qa-wp-compat/references/fixtures/visualizer-blueprint.json (Codeinwp/qa-compatibility), open /wp-admin/post.php?post=9002&action=edit; then wp core update --version=7.2-RC2 --force and wp core update-db, and open it again.
Tracking: Codeinwp/qa-compatibility#133
Activity
girishpanchal30 commentedon Nov 24, 2026
I have fixed it with PR #1417
milicavs commentedon Nov 24, 2026
🧪 QA steps and test links
Since WordPress 7.1 puts the post editor in an iframe, Visualizer chart blocks no longer draw in the page and post editor. Google Charts and Chart.js blocks stay empty, a Table (DataTable) block shows "This block has encountered an error and cannot be previewed", and opening "Display an existing chart" crashes the block. The front end, widgets and classic editor are not affected.
Requires: WordPress 7.1 or newer.
127676b(Plugins shows 4.0.11-dev.e21b97d)In the links:
debug.log.Reproduce on Visualizer 4.0.11 (WordPress 7.1 or newer):
<!-- wp:visualizer/chart {"id":<chart ID>} /-->once per chart, using the IDs from Visualizer's chart library.The container #reactgooglegraph-<n> is not defined.Edge cases
[visualizer id="…"]shortcode pages: charts still show as before.Fix: #1417 (open)
pirate-bot commentedon Nov 24, 2026
QA agent — 🟡 Needs human QA · On WordPress 7.2-RC2 the Visualizer block draws charts in the iframed editor again, and the chart picker works without crashing.
I installed WordPress 7.2-RC2 with the PR build of Visualizer and the issue's test data: 16 charts and the page with three chart blocks. In the editor, the Google pie and the DataTable block now draw, with no 'container is not defined' errors. The picker shows drawn previews, and a picked line chart stays after publishing and reloading and appears on the front end. The same site running the code before the fix drew nothing and threw the container errors, so the fix is proven. Two points still need a person: the Chart.js block's editor preview comes out as a small pie squeezed into a narrow column with blank legend labels, and the PR's DataTable end-to-end test could not run as written in this sandbox.
Worth a human look
Checks (4 passed · 2 not tested)
Full report, evidence and session trail
pirate-bot commentedon Nov 25, 2026
🎉 This issue has been resolved in version 4.0.12 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
poonam279 commentedon Nov 26, 2026
Retested on WordPress 7.2-RC3: ✅ passes now, with Visualizer 4.0.12 (the release notes list "Fixed rendering of block charts inside editor iframe"). On a site updated in place from 7.1.5 (Twenty Twenty-One, PHP 8.3), page 9002's three chart blocks are drawn in the post editor, the block's chart picker opens without "This block has encountered an error" and previews all six offered charts, the first chart is picked, drawn, kept after a reload and shown on the front end, and the block also works in the widgets editor. The same 4.0.12 passes identically on 7.1.5, so 4.0.11's failure is fixed on both versions. Everything else matched too.
betachannel still serves RC2, not RC3)The Playground links install whatever Visualizer wordpress.org serves today (4.0.12). Closing is for the product team.