Open petecooper opened 8 months ago
Thanks @petecooper. It looks like we are hold by jQuery file uploader that uses few removed methods.
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.
Demo server is blocking something, not sure what.
I can have a look - what can you see?
Not able to save an article, for example. This shouldn't be directly related to jQuery 4 since it works on my localhost.
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.
Yep, it looks like a csp conflict. Ironically, jQuery 4 intends to solve them.
I'll see how I can workaround it in the meantime, leave it with me for now.
I'm a little perplexed - this appears to be solved, yet I haven't changed anything. Are you able to reproduce, @bloatware?
@petecooper oops, sorry, I thought you have seen. We'd rather do some tests locally before pushing it online.
Now seen đź‘Ť
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)
jQuery 4.0.0 beta 2 landed: https://blog.jquery.com/2024/07/17/second-beta-of-jquery-4-0-0/
https://github.com/jquery/jquery/issues/5365#issuecomment-1819261993
Placeholder issue for jQuery 4.0.0 compatibility / issues.