Repository navigation
Frontend chart rendering fatals when settings series is false #1368
Description
Summary
Rendering a Visualizer chart can terminate the frontend request with TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given when the chart's stored settings contain a boolean series value.
Expected behavior: a chart with an invalid or legacy series-settings value is handled without a fatal frontend error.
Actual behavior: the chart shortcode triggers an uncaught TypeError before the chart is rendered.
Impact: affected pages fail during content rendering; telemetry recorded 1,624 occurrences across two sites.
Customer context
- Product / area: Visualizer frontend shortcode rendering
- Version: 4.0.7
- Environment: WordPress 6.8.8, PHP 8.1.34
- Integration / third party: The representative trace includes Avada/Fusion Builder shortcode rendering; the failure originates in Visualizer.
- Reported error / symptom:
count()receivedboolin Visualizer frontend chart-data processing. - Impact: 1,624 telemetry occurrences across 2 sites between 2026-08-27 and 2026-08-29.
Reproduction notes
- Create or identify a Visualizer chart with stored
visualizer-settingscontaining aserieskey whose value isfalse. - Render that chart through the
[visualizer id="..."]shortcode on a PHP 8.1 site. - Observed in production telemetry: frontend rendering reaches
getChartData()and throws the reportedcount()TypeError.
Local runtime reproduction was not performed; the production stack trace and v4.0.7 source directly match this input path.
Diagnosis
Conclusion
Telemetry records an uncaught TypeError in Visualizer_Module_Frontend::getChartData() while rendering a frontend shortcode. The inspected v4.0.7 code calls count( $settings['series'] ) after only checking that the key exists, not that its value is countable. Since the captured argument is bool, this exact branch can fatal on PHP 8.1.
Where this likely occurs
classes/Visualizer/Module/Frontend.php—Visualizer_Module_Frontend::renderChart()lines 302-340 invokesgetChartData()before rendering the shortcode output.classes/Visualizer/Module/Frontend.php—Visualizer_Module_Frontend::getChartData()lines 734-775 loadsvisualizer-settings; lines 753-759 callcount()onsettings['series']and then mutate it.- Git history attributes that block to commit
8dc5344cd(Fix chart render issue on frontend side), and it is present fromv3.7.1throughv4.0.7. No release boundary showing a previously working product version was identified.
Engineering notes
- The source path is Visualizer free-plugin code, not the bundled Themeisle SDK; telemetry also marks SDK involvement as false.
- The guard at line 753 only establishes key presence. It permits a stored boolean value to reach PHP's
count()call. - The trace reaches Visualizer from nested Fusion Builder shortcodes, but Visualizer's own frontend method is the direct fatal location. The inspected path does not establish whether the invalid metadata was created by Visualizer, an older release, a Pro workflow, or another integration.
Test coverage status
tests/test-ajax.phplines 100-134 covers settings sanitization through the classic editor save route.- No relevant frontend shortcode or
getChartData()coverage was found during inspection. The inspected test coverage does not exercise a storedvisualizer-settingsvalue whoseserieskey is boolean.
What to verify or explore next
- Reproduce with a Visualizer chart whose stored settings include
series => false, then render[visualizer id="..."]on PHP 8.1. - Check comparable chart metadata created by classic editor, Gutenberg, import, and Pro-enabled workflows.
- Run the PHPUnit suite, with focused coverage around frontend shortcode rendering if such a suite exists outside the inspected paths.
Unknowns / follow-up
- The available telemetry does not include the affected chart metadata or the workflow that persisted the boolean value.
- The current inspection did not reproduce against a local WordPress runtime.
Confidence
Confidence: 98/100
Production telemetry provides a repeatable PHP 8.1 fatal at Visualizer's own frontend chart-data method, and the inspected v4.0.7 source passes settings['series'] to count() without validating it is countable. The telemetry's boolean argument proves this reachable input shape.
Crash telemetry
| Occurrences | 1624 |
| Distinct sites | 2 |
| First seen | 2026-08-27 21:59 UTC |
| Last seen | 2026-08-29 05:29 UTC |
| Crash location | product:classes/Visualizer/Module/Frontend.php:753 |
| Request context | frontend |
| Inside Themeisle SDK | no |
| Product versions | 4.0.7 |
| WP versions | 6.8.8 |
| PHP versions | 8.1.34 |
| SDK versions | 3.3.57 |
Source: automated crash report — visualizer, fingerprint be99bfef9b69efe3a682acbc2c11761c
Generated by bug-report-triage (ID: bug-report-triage_6a9275bdde8d92.68013411)
Activity
pirate-bot commentedon Sep 10, 2026
Automated crash telemetry captured this again: 168 occurrence(s) across 1 site(s), last seen 2026-09-09 13:02 UTC.
Customers experience a fatal frontend rendering failure with the error
count(): Argument #1 ($value) must be of type Countable|array, false given. The root cause is located inVisualizer_Module_Frontend::getChartData()withinclasses/Visualizer/Module/Frontend.php, wherecount( $settings['series'] )is called after only anisset()check, allowing a booleanfalsestored series setting to trigger the error on PHP 8.3. This can be reproduced by rendering a chart via shortcode whose storedvisualizer-settingsmetadata hasseries => false.Source: automated crash report — visualizer, fingerprint
a62ac5b7bc6541f5b1efeadfa28b7b5bGenerated by bug-report-triage (ID: bug-report-triage_6aa24823eef569.61831935)
pirate-bot commentedon Sep 11, 2026
🎉 This issue has been resolved in version 4.0.8 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀