Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2022-02-03 09:38:42

Xavez2
Member
Registered: 2017-09-19
Posts: 16

Image upload not possible (4.8.8)

Hey everyone

I’ve recently updated to PHP 8 and TXP 4.8.8. For some reason, it seems that image uploads do not work anymore. I believe the permissions on the folders are set correctly. The weird thing is that Textpattern doesn’t send me any error message. It just shows the upload bar for 200ms and then immediately fails. The image files are in the kilobytes, so I don’t believe this is the issue.

Any creative ideas? :)

Offline

#2 2022-02-03 10:15:27

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,296
GitHub

Re: Image upload not possible (4.8.8)

Check your Diagnostics in the admin-side (Admin -> Diagnostics), are there any errors or warnings shown?

Offline

#3 2022-02-03 10:21:51

Xavez2
Member
Registered: 2017-09-19
Posts: 16

Re: Image upload not possible (4.8.8)

gaekwad wrote #332622:

Check your Diagnostics in the admin-side (Admin -> Diagnostics), are there any errors or warnings shown?

I checked this as well, just checked again to be sure and there are none :)

Offline

#4 2022-02-03 10:24:14

Xavez2
Member
Registered: 2017-09-19
Posts: 16

Re: Image upload not possible (4.8.8)

So the dumbest thing I failed to check of course: it seems like this is a browser issue. The upload form doesn’t work anymore in Safari 15.3.

Offline

#5 2022-02-03 12:51:05

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,243
Website

Re: Image upload not possible (4.8.8)

Xavez2 wrote #332624:

So the dumbest thing I failed to check of course: it seems like this is a browser issue. The upload form doesn’t work anymore in Safari 15.3.

Uh? It works perfectly fine with Safari 15.3 + MacOS 12 and iOS 15.

Edit –

  1. Does the browser console reports anything relevant?
  2. Do you happe to have any browser extension that might interfere?

Last edited by phiw13 (2022-02-03 12:52:57)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#6 2022-02-03 16:06:51

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,296
GitHub

Re: Image upload not possible (4.8.8)

Xavez2 wrote #332624:

So the dumbest thing I failed to check of course: it seems like this is a browser issue. The upload form doesn’t work anymore in Safari 15.3.

Does Safari need extra access to upload stuff from your drive? I know macOS is getting more and more picky about that kind of thing. Can you upload via a browser to other sites?

Offline

#7 2022-02-03 16:57:31

Xavez2
Member
Registered: 2017-09-19
Posts: 16

Re: Image upload not possible (4.8.8)

phiw13 wrote #332630:

Uh? It works perfectly fine with Safari 15.3 + MacOS 12 and iOS 15.

Edit –

  1. Does the browser console reports anything relevant?
  2. Do you happe to have any browser extension that might interfere?

  1. When I upload: [Error] Failed to load resource: cannot parse response (index.php, line 0)
  2. All extensions disabled
gaekwad wrote #332636:

Does Safari need extra access to upload stuff from your drive? I know macOS is getting more and more picky about that kind of thing. Can you upload via a browser to other sites?

Pretty sure that’s not the case, works perfectly on other websites :)

Last edited by Xavez2 (2022-02-03 16:58:48)

Offline

#8 2022-02-03 18:11:22

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,296
GitHub

Re: Image upload not possible (4.8.8)

Xavez2 wrote #332637:

[Error] Failed to load resource: cannot parse response (index.php, line 0)

stackoverflow.com/questions/70331391/fetch-http-request-succeeds-in-chrome-and-firefox-but-fails-in-safari

…which leads to:

serverfault.com/questions/937253/https-doesnt-work-with-safari

Try adding Header unset Upgrade to your .htaccess, does that help?

Offline

#9 2022-02-04 10:55:13

Xavez2
Member
Registered: 2017-09-19
Posts: 16

Re: Image upload not possible (4.8.8)

gaekwad wrote #332639:

stackoverflow.com/questions/70331391/fetch-http-request-succeeds-in-chrome-and-firefox-but-fails-in-safari

…which leads to:

serverfault.com/questions/937253/https-doesnt-work-with-safari

Try adding Header unset Upgrade to your .htaccess, does that help?

amazingly, it does! :O. Should’ve searched on stack overflow first. Thank you so much 🙏

Offline

#10 2022-02-04 11:34:53

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,243
Website

Re: Image upload not possible (4.8.8)

gaekwad wrote #332639:

[…] Try adding Header unset Upgrade to your .htaccess, does that help?

Do you have any idea what kind of server configuration would trigger this ?


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#11 2022-02-04 12:00:00

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,475
Website GitHub

Re: Image upload not possible (4.8.8)

Well that’s a new one. Seems as if it’s edge casey and depends on the Apache or server config settings. We should keep an eye on this just in case there’s anything we can do by default to mitigate such issues with non-standard hosting setups.

Good ol’ Stack Overflow!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#12 2022-02-04 13:02:12

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,296
GitHub

Re: Image upload not possible (4.8.8)

phiw13 wrote #332643:

Do you have any idea what kind of server configuration would trigger this ?

httpd.apache.org/docs/2.4/mod/mod_http2.html#h2upgrade

This directive toggles the usage of the HTTP/1.1 Upgrade method for switching to HTTP/2. This should be used inside a <VirtualHost> section to enable Upgrades to HTTP/2 for that virtual host.

This method of switching protocols is defined in HTTP/1.1 and uses the “Upgrade” header (thus the name) to announce willingness to use another protocol. This may happen on any request of a HTTP/1.1 connection.

This method of protocol switching is enabled by default on cleartext (potential h2c) connections and disabled on TLS (potential h2), as mandated by RFC 7540.

Please be aware that Upgrades are only accepted for requests that carry no body. POSTs and PUTs with content will never trigger an upgrade to HTTP/2. See H2Direct for an alternative to Upgrade.

This mode only has an effect when h2 or h2c is enabled via the Protocols.

Offline

Board footer

Powered by FluxBB