Why Your ARI Stream Quiz Button Isn’t Responding
You added [streamquiz id="…"]
in Elementor. The Start Quiz button shows up but does nothing. No console errors. No AJAX calls.
Root Cause: Mismatched Quiz IDs
By default, ARI Stream Quiz prints its init script in the footer. Elementor’s Shortcode widget runs your quiz twice—once in the editor preview, once on the live page. That generates two different quiz IDs. The JavaScript binds to the first ID but the container uses the second. They never match, so the click handler never attaches.
The Simple Fix: Inline the Quiz Script
Adding inline_scripts="1"
to your shortcode forces the plugin to load its init code right where the quiz appears. That keeps the JS ID and the HTML container ID in sync. Your button click will fire as expected.
[streamquiz id="14" inline_scripts="1"]
Bulk Updating All Quizzes with SQL
Instead of editing every post, run two SQL commands to inject inline_scripts="1"
site-wide.
1. Update Posts Table
UPDATE wp_posts
SET post_content = REPLACE(
post_content,
'streamquiz id=',
'streamquiz inline_scripts="1" id='
)
WHERE post_content LIKE '%streamquiz id=%';
2. Update Elementor Data in Postmeta
UPDATE wp_postmeta
SET meta_value = REPLACE(
meta_value,
'streamquiz id=',
'streamquiz inline_scripts="1" id='
)
WHERE meta_value LIKE '%streamquiz id=%';
These queries cover both normal post content and Elementor’s JSON blobs.
Testing and Results
- Clear your site and browser cache.
- Reload a page with your quiz shortcode.
- Click Start Quiz.
The button now initializes the quiz and loads each question as expected.
Leave a Reply