textpattern icon indicating copy to clipboard operation
textpattern copied to clipboard

jQuery 4.0.0 compatibility tracking

Open petecooper opened this issue 1 year ago • 16 comments
trafficstars

https://github.com/jquery/jquery/issues/5365#issuecomment-1819261993

Placeholder issue for jQuery 4.0.0 compatibility / issues.

petecooper avatar Dec 26 '23 22:12 petecooper

https://blog.jquery.com/2024/02/06/jquery-4-0-0-beta/

petecooper avatar Feb 07 '24 06:02 petecooper

Thanks @petecooper. It looks like we are hold by jQuery file uploader that uses few removed methods.

bloatware avatar Feb 07 '24 08:02 bloatware

My local txp runs jQuery 4 beta, so far so good. Should we try using it in dev, to enlarge the testers pool? We'd switch back to jQuery 3 of course if txp 4.9 is released before jQuery 4.

bloatware avatar May 23 '24 11:05 bloatware

Demo server is blocking something, not sure what.

bloatware avatar May 24 '24 12:05 bloatware

I can have a look - what can you see?

petecooper avatar May 24 '24 13:05 petecooper

Not able to save an article, for example. This shouldn't be directly related to jQuery 4 since it works on my localhost.

bloatware avatar May 24 '24 14:05 bloatware

Refused to execute https://dev-demo.textpattern.co/dev/textpattern/index.php?_=1716559654637 as script because "X-Content-Type-Options: nosniff" was given and its Content-Type is not a script MIME type.

Might that be it?

Edit: console output when saving a (new) article.

petecooper avatar May 24 '24 14:05 petecooper

Yep, it looks like a csp conflict. Ironically, jQuery 4 intends to solve them.

bloatware avatar May 24 '24 15:05 bloatware

I'll see how I can workaround it in the meantime, leave it with me for now.

petecooper avatar May 24 '24 16:05 petecooper

I'm a little perplexed - this appears to be solved, yet I haven't changed anything. Are you able to reproduce, @bloatware?

petecooper avatar May 25 '24 17:05 petecooper

@petecooper oops, sorry, I thought you have seen. We'd rather do some tests locally before pushing it online.

bloatware avatar May 26 '24 08:05 bloatware

Now seen 👍

petecooper avatar May 26 '24 09:05 petecooper

I can of course reproduce the issue when the X-Content-Type-Options "nosniff" header is present. Once that is disabled (header unset … in textpattern/.htaccess), I still have saving issues on the Write tab (actually, no way to Save anything, old or new article) – both my old test site and a newish fairly default installation.

The Firefox console reports:

As a warning The script from “http://txpdev.local/textpattern/index.php?_=1716781530549” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.

As an error: Uncaught SyntaxError: expected expression, got '<' (index.php 1:1)

I suspect there is some attempt at setting a response header that fails

–^–

All other panels behave correctly as far as I can see, images/files are uploaded or replaced, categories created, preferences saved. The few admin-side plugins active do what they are supposed to… etc. This testing with a fairly strict set of CSP directives (in config.php)

phiw13 avatar May 27 '24 04:05 phiw13

jQuery 4.0.0 beta 2 landed: https://blog.jquery.com/2024/07/17/second-beta-of-jquery-4-0-0/

petecooper avatar Jul 24 '24 13:07 petecooper