jewlofthelotus / SlickQuiz-WordPress

SlickQuiz is a plugin for displaying and managing pretty, dynamic quizzes. It uses the SlickQuiz jQuery plugin.
http://wordpress.org/extend/plugins/slickquiz
Other
18 stars 19 forks source link

Issue with slickquiz since Wordpress update 5.6 #105

Open harwooje opened 3 years ago

harwooje commented 3 years ago

This was first noticed after the WP 5.6 update, so may or may not be a Wordpress update issue. The fields for a new quiz are entered and "Save Draft" is clicked. Then there's an error notice and all the text fields are highlighted in red indicating that there no content in the fields -- but there is. See linked screenshot.

One thing I'm realizing now -- the plugin code has some modified somewhat to help identify the names of our custom post types, etc. So, in fact, this may be just an issue for us, though everything worked great for several years until just recently.

harwooje commented 3 years ago

Our #1 programmer looked at this issue and here's his note to me -- referring to the admin.js file in the slickquiz plugin: John It took me a while for me to understand what is actually going on with this script. The short answer is, yes, the issue is related to the update with jQuery migrate in WP 5.6. The script is using attr() function which was looking at both attribute and property with jQuery migrate. Without it, it only looks for the initial value attribute, not the "dynamic" value property resulting in empty field errors. A quick fix for this is to replace input.attr('value') to input.val() in wp-content/plugins/slickquiz-sq1/js/admin.js line 599.