No Code Attached Yet
avatar casaschi
casaschi
19 Aug 2021

I'm managing the embedchessboard extension, it works great on joomla 4 apart from an installation issue.

The extension is registered on the joomla extension directory to support the web install option.
The download URL was fully working on joomla 3.x
http://downloads.sourceforge.net/project/pgn4web/embedchessboard-joomla-plugin-3.05.00.zip

This is the URL on sourceforge that will redirect to one of their mirrors.

The web install on joomla 4 gives an error, about missing the manifest file, that means it did not download the file correctly. Same passing the URL above to the "install from URL form".

If instead I use the actual mirror address in the "install from URL form", it all works:
https://kumisystems.dl.sourceforge.net/project/pgn4web/embedchessboard-joomla-plugin-3.05.00.zip

Something changed from joomla 3.x to joomla 4 that does not like URL redirects when downloading an extension. Is this intentional or it's a bug? How do I report this issue for a fix?

Thanks.

PS: temporarily I changed the web install URL to restore the functionality, but it would really be great to get it back to work as in joomla 3.x

avatar casaschi casaschi - open - 19 Aug 2021
avatar casaschi casaschi - change - 19 Aug 2021
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 19 Aug 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 19 Aug 2021
avatar casaschi
casaschi - comment - 19 Aug 2021

If you try in the extension "Install from URL" form, both
http://downloads.sourceforge.net/project/pgn4web/embedchessboard-joomla-plugin-3.05.00.zip
and
https://downloads.sourceforge.net/project/pgn4web/embedchessboard-joomla-plugin-3.05.00.zip
fail.

Only the last URL works, the one that does not redirects anymore:
https://kumisystems.dl.sourceforge.net/project/pgn4web/embedchessboard-joomla-plugin-3.05.00.zip

It might be that sourceforge is doing something funny... but it used to work without a glitch in joomla 3.x


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35231.

avatar PhilETaylor
PhilETaylor - comment - 19 Aug 2021

When Joomla calls

GET /project/pgn4web/embedchessboard-joomla-plugin-3.05.00.zip HTTP/1.1
Host: downloads.sourceforge.net
User-Agent: Mozilla/5.0 Joomla!/4.0.1-dev Joomla
Accept: */*
Connection: keep-alive

The response is:

HTTP/1.1 307 Temporary Redirect
Server: nginx
Date: Thu, 19 Aug 2021 16:33:51 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 454
Location: https://sourceforge.net/projects/pgn4web/files/embedchessboard-joomla-plugin-3.05.00.zip/download?use_mirror=kumisystems
Proxy-Connection: keep-alive

<html>
 <head>
  <title>307 Temporary Redirect</title>
 </head>
 <body>
  <h1>307 Temporary Redirect</h1>
  The resource has been moved to <a href="https://sourceforge.net/projects/pgn4web/files/embedchessboard-joomla-plugin-3.05.00.zip/download?use_mirror=kumisystems">https://sourceforge.net/projects/pgn4web/files/embedchessboard-joomla-plugin-3.05.00.zip/download?use_mirror=kumisystems</a>;
you should be redirected automatically.


 </body>
</html>

Joomla doesnt handle a 307. Joomla will only handle a 302 Found redirect.

avatar casaschi
casaschi - comment - 19 Aug 2021

"Joomla doesnt handle a 307. Joomla will only handle a 302 Found redirect."

it used to work in joomla 3.x... any chance of restoring the functionality?

In a way, it makes sense to use the temporary redirect because sourceforge uses a pool of mirrors, so requesting the same URL at different times might result in a different mirror being selected and a different final URL.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35231.

avatar PhilETaylor
PhilETaylor - comment - 19 Aug 2021

Its been this way for 3 years from #23065 046f014

avatar PhilETaylor
PhilETaylor - comment - 19 Aug 2021

In fact when testing Im getting a 200 OK header now... with no body..

Investigating.

avatar casaschi
casaschi - comment - 19 Aug 2021

It seems I haven't checked for a while... I just spotted the issue now doing some checks on joomla 4.

Still, would there be any issue in handling a 307 response in the same way as a 302 response?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35231.

avatar casaschi
casaschi - comment - 19 Aug 2021

Weird, but I have very little chance of changing sourceforge behaviour.

Such a pity that the joomla extension directory does not offer the possibility to pull the extension from their server...


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35231.

avatar PhilETaylor
PhilETaylor - comment - 19 Aug 2021

sourceforge is just trying to protect against leeching... its now giving me different responses each time.

avatar PhilETaylor
PhilETaylor - comment - 19 Aug 2021

Ok I have it stable now.

The first call is a 307 redirect which it seems Joomla (somehow) is following.

This redirects me to https://sourceforge.net/projects/pgn4web/files/embedchessboard-joomla-plugin-3.05.00.zip/download?use_mirror=kumisystems

That is a 200 OK response with a full HTML page.

Sourceforge is not giving us any Zip file url to download - it gives us a 200 OK with a HTML page.

This is Sourceforge protecting against leeching and automated downloads.

This therefore cannot be fixed in Joomla..

Screenshot 2021-08-19 at 17 54 01

avatar PhilETaylor
PhilETaylor - comment - 19 Aug 2021

It should also be noted that if you do all this at the command line with Curl you will first get a 302 and then a 200 with the zip file contents.

avatar casaschi
casaschi - comment - 19 Aug 2021

The conclusion seems that I need to find another host for the download package of my joomla extension :-(

Thanks for looking into this!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35231.

avatar PhilETaylor
PhilETaylor - comment - 19 Aug 2021

Sourceforge is so 1990s anyway :)

GitHub is the way to host code now :)

avatar richard67 richard67 - change - 19 Aug 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-08-19 17:28:26
Closed_By richard67
avatar richard67 richard67 - close - 19 Aug 2021
avatar richard67
richard67 - comment - 19 Aug 2021

Closing as not a core issue.

Add a Comment

Login with GitHub to post a comment