HD Quiz

Need to send invoices?
Check out my new WordPress plugin HDInvoice
Limited time launch sale

Hi Dylan, thanks for the great plugin and for your suppor…

Published: July 11, 2022
Support status: closed

Hi Dylan,
thanks for the great plugin and for your support in the past!

I’getting back to you because just recently a weird error occurred:

For almost 2 years I have been using several quizzes without any problems. All the pages with the quiz shortcodes (and the quizzes themselves) still work perfectly.
However, if I create a new page and place one of the quizzes on the new page, the quiz doesn’t work. The start button is showing if I set up a timer and the questions are being displayed if I choose no timer. In the first case the quiz doesn’t start, in the second, I cannot finish.

I checked the firefox debugger and found out that the quiz does not load / the questions do not load, which leads to an error because “HDQ.EL.quizzes.length” returns “0”.

What actually really confuses me is why it works on one page and on the other it does not. What’s the difference between pages except the date it was created? Each contains only one quiz and it does not matter if it’s the same or two different quizzes. The new pages don’t work, the old ones do…

Do you have any idea what I could check or where to search?

Than you and kind regards,
Heiko

This thread has been imported from harmonicdesign.ca/hd-quiz/

thread author: Heiko

Hi Heiko,
are you able to send a link to an example of this so I can take a look?

> In the first case the quiz doesn’t start, in the second, I cannot finish.

This sounds like the issue is that your site has a fatal error somewhere that happens before HD quiz can print the javascript. But if HDQ.EL.quizzes.length is returning an error, then as you have already guessed, this means that the quiz itself is not actually printing on your site, but the site IS correctly loading the quiz assets (CSS and JS). So… I have no idea haha. But if you can send me a link I can take a look and be able to rule a lot of things out

11 July 2022 — 11:33 support admin - Dylan

Hi Dylan,

thanks for your quick reply.
Actually, I found the problem by checking all my plugins (switching them off one at a time…)

…You won’t believe it …:

I figured it was the plugin “All in one SEO”. Actually, in the end I didn’t have to deactivate the plugin but to change the default site description. The default was set to an excerpt of the text. Deleting the default and entering some new text helped.

This is super weird but explains why only newly created pages have this problem and not the old ones because those were already “configured” correctly.
Additionally this must have happened together with the last AIO-SEO update because earlier there was no problem…

So, if anyone here uses AIO-SEO in combination with HD quiz, too, here’s how to fix the error. Actually one more reason to get rid of it and maybe better using YOAST…

Best,
Heiko

11 July 2022 — 11:46 thread author - Heiko

Glad you figured it out.

Out of curiosity, do you have “Run Shortcodes” enabled in All In One SEO settings? (search appearance -> Advanced). I’m wondering if a recent version of that plugin changed the way that feature works.

11 July 2022 — 11:51 support admin - Dylan

Indeed, this function was enabled. I had no idea that this feature even existed… There is also a little statement that this function can cause problems with “third party plugins” (isn’t AIO-SEO a third-party plugin, too?) and that it is disabled y default. Actually, it was enabled by default…

I have disabled it and see if the error still occurs. Thanks for the tip! 🙂

Best,
Heiko

15 July 2022 — 09:14 thread author - Heiko

If you are enjoying HD Quiz please leave a review here on the official WordPress.org page. HD Quiz is developed by me, just some dude, and is supported and available for free. It may seem dumb, but truly nothing makes me happier than knowing that people are using and loving HD Quiz and my hard work.

This thread has either been marked as complete or has been automatically closed due to inactivity.