Hi amosnier,
I see you downgraded to the previous 1.8.15
version, so I cannot provide any support or bug testing for this (can’t fix what I can’t see). However, I see that you are using WP-Optimize.
Here is a support thread from another user that I *think* had the exact same issue as you, along with the solution.
https://hdplugins.com/hdsupport/hd-quiz-support/styles-not-working/#hdsupport_response_2477
I am sorry, the page address I gave was my production site, where I had to downgrade to the version 1.8.15 in order to let mthe quizs working. The version 2.0.0 is on my developement site
https://dev3.attacn91.fr/quiz-europe/ where there is neither cache nor minification (WP-Optimer disabled). You can then see the strange behaviour, described previously, and compare with the perfect behaviour of the production site (version 1.8.15) https://attacn91.fr/quiz-europe/
I will now test if the version 2.0.0 of the quiz plugin has some conflict with other plugins.
You have the site region blocked, so I cannot view it.
So sorry. I just disabled the region blocking on the developement site. I think you can view now. I will do te same for the production site in 5 minutes.
Works thanks!
I see the problem, but I don’t know how this became a problem for you.
It looks like the site is unable to grab the quiz settings. Because of this, the variable for the timer is set to 0. This is why you think it shows the results by default -> the quiz is instantly completing.
Are you able to edit the quiz and see the settings? What is set for the quiz timer?
Something else that would be immensely useful is if you could enable WP_DEBUG to see if there are any errors on the site stopping HD Quiz from correctly getting the quiz settings.
You see instructions on how to do so here: https://hdplugins.com/learn/wordpress/wordpress-debug-steps/
I just discovered that when I select the quiz, whereas the list of QUESTIONS is fine, the QUIZ SETTINGS is empty ! So I can’t adjust any setting !
With Debug True, the debug.log file just says : “PHP Warning: foreach() argument must be of type array|object, null given in /home/attacnfrpy/dev3/wp-content/plugins/hd-quiz/classes/quiz.php on line 306”
Just want to say thanks for getting me that error report!
This means that the JSON string for the settings failed to parse.
The only thing I can think of that could cause this (and reviewing it myself right now, I realize the big mistake I made), is that your quiz title has a "
in it or perhaps a backslash \
.
Can you confirm what the quiz title is?
In fact, I have 4 quizzes on my site, that all give the samee behaviour :
Quiz Europe, Quiz Sécurité Sociale, Quiz Superprofits, Quizz Dette – Fiscalité
Hmmm that’s concerning. Because I was right in the bug in my code. Even in my own test environment, if I create a quiz with "
in the title, it breaks in the exact same way it is for you.
Luckily, it’s a very easy fix. So easy, I just pushed it out! In about 5 minutes, you should be able to delete your current HD Quiz install, and install fresh from the repository (I didn’t bump the version number, so WordPress won’t prompt you to update).
However, none of your quiz titles have a "
so although what I fixed is a good thing – it might not be what is needed in your case.
If you could please
- Install the fresh version and see if that works for you
- If it doesn’t work, let me know what language your admin area/site is. The only other possible thing I can think of that could invalidate the JSON string is the translations.
I want to thank you again for your time and patience in helping me debug this. Because of you, I found two bugs!
The first I already fixed. The second, was an issue with the translation file for French. The translation for Marking
was translated as ---Valider
. Those spaces at the start are what was causing the failure!
I’ll push out a real numbered update to HD Quiz that will fix this shortly. Thanks again!
It is a real pleasure to help (in spite of myself) for the development of the plugin, because the format of these quizzes is very appreciated by my friends …
Update just pushed out. I’m pretty confident that this will fix, but please let me know!
Yes, congratulations ! everything is fine now ..
You can check yourself … for example this onr https://dev3.attacn91.fr/quiz-europe/