Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Normalize 'ver' query param in script/style validation errors to prevent recurrence after accepted #1346
A validation error for an enqueued script can look like this:
In this case for the Google Translate widget in Jetpack, the script is enqueued without any
Excellent catch @westonruter. You’re right. That will be a problem. To solve it, you are suggesting that we replace the variable value of the
There’s another edge case: when the version is made part of the URL as a directory or within the file name itself.
For this one, I don’t think there’s anything we can do. Why? There’s not a consistent pattern to parse for us to differentiate a valid URL vs. embedded version. Regardless, I wanted to note it for discussion.
@hellofromtonya That's good to note. That would be a problem in the Gutenberg edit post screen which includes asset URLs such as:
However, in the case of Gutenberg at least, these aren't ever enqueued on the frontend and so it wouldn't be a concern per se. It would be problematic if another plugin tried to enqueue them. But we could address that at a later time.