textpattern / textpattern

A flexible, elegant, fast and easy-to-use content management system written in PHP.
https://textpattern.com
GNU General Public License v2.0
777 stars 111 forks source link

jQuery 4.0.0 compatibility tracking #1896

Open petecooper opened 8 months ago

petecooper commented 8 months ago

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

Placeholder issue for jQuery 4.0.0 compatibility / issues.

petecooper commented 7 months ago

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

bloatware commented 7 months ago

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

bloatware commented 4 months ago

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 commented 3 months ago

Demo server is blocking something, not sure what.

petecooper commented 3 months ago

I can have a look - what can you see?

bloatware commented 3 months ago

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

petecooper commented 3 months ago

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.

bloatware commented 3 months ago

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

petecooper commented 3 months ago

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

petecooper commented 3 months ago

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

bloatware commented 3 months ago

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

petecooper commented 3 months ago

Now seen đź‘Ť

phiw13 commented 3 months ago

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)

petecooper commented 1 month ago

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