Problem/Motivation
Currently the status report displays warnings depending on which jQuery verions you've selected. Ours looks like this:

We (and I'm sure there are others like us) have a system in place that automatically creates tickets when there are warnings or errors in the status report.
Steps to reproduce
Install jQuery Update 4.x, select jQuery 1.12 and navigate to the status report page.
Proposed resolution
Add a setting to hide the warning (default off), so site managers/administrators can choose to hide the message, acknowledging the warning.
Remaining tasks
Add the setting to the admin form, hide the warnings if enabled.
User interface changes
Extra field to the admin form, hiding the warnings from the status report if enabled.
API changes
N/A
Data model changes
N/A
Comments
Comment #2
mcdruid commentedThanks for filing this.
However, I'm not sure why you're getting those warnings; jQuery 1.12(.4) is one of the Supported versions.
Do you have something non-default set up for jQuery UI?
On a totally clean D7 install with 7.x-4.x if I configure the default theme to use jQuery 1.12 this is what I see in the status report:
Comment #3
jelle_sI don't have anything non-default AFAIK. I'm seeing this on all my D7 sites using jquery_update (migrated from version 3 of this module). On none of these it seems to be able to detect the JQuery UI version... I'll dig into this some more
Comment #4
jelle_sOk, I think I found the issue. Since the value for
jquery_update_custom_version_jqueryuiin the form on/admin/config/development/jquery_update, defaults to an empty string, saving that form results in that variable being set to an empty string. So then injquery_update_jqueryui_replace(), (called fromjquery_update_library_alter()) the version gets replaced with an empty string. I'm guessing submitting that form with an empty value forjquery_update_custom_version_jqueryui(and probably some other variables as well), should delete that variable, and not set it to an empty string? We'll probably also need an update hook that deletes the variable if the current value is an empty string, to fix current installations like mine.Comment #5
mcdruid commentedAh right, yes the empty strings in variables managed via a system_settings_form can be a pain.
I believe that's why in a few other places we're checking whether custom values are empty.
We should probably do something like that in
jquery_update_custom_version_jqueryui()too.I think I'd prefer to do that than implement a custom submit handler to delete the variables if they're submitted as empty strings.
I actually think something else might have happened in your case where the UI version is showing up as an empty string though; with the variable set to an empty string this still returns a correct value:
...and I'm not getting any warnings on the status page; jQuery Update is still showing the same results as my previous screenshot.
The total absence of tests in this module is a bit of a nightmare.
Comment #6
jelle_sWeird, for me (without the patch) it gives me the warnings in my screenshot
Comment #7
mcdruid commented@Jelle_S if you delete that variable (and clear cache) does that change anything?
Comment #8
jelle_sYes, it does:
It consequently also fixes the status report (as expected)
Comment #11
mcdruid commentedOkay, added validate and submit handlers for the settings form.
It'd be nice if the validate handler looked at the custom path when no version has been submitted and suggested a value (should be fairly easy with a regex), but I've not implemented that initially.
So now custom paths / versions that are empty will result in the variable being deleted.
Does this fix your issue @Jelle_S?
Comment #12
mcdruid commentedThis functionality has changed a bit as we've removed all of the "unsupported" library versions.
The module now checks custom versions against the latest available releases and shows that info in the Status report... however this functionality can be disabled.
Thanks for the report; I think we can close this issue.