0

I have created a new version of my Joomla extension.

Manual upgrade via zip file or the directory works fine.

But the automatic upgrade (which used to work fine before), now gives an error 500 and the following error messages: "Unknown Archive type", "*Update path does not exist" and "Installation unexpectedly terminated: Update path does not exist".

I have no idea why those messages appear.

The update.xml references the correct zip files. Downloading it manually works just fine.

Joomla(/php/apache) has all rights on the folder containing the joomla installation. After trying the automatic update, the tmp folder contains the downloaded zip archive with the latest extension version, interestingly without the .zip extension. Is the Joomla downloader not correctly naming the file and then failing upon finding that the file doesn't have a .zip extension?`Or what could it be?

Would be very thankful for any ideas...

Edit: My project is hosted on github, and github seems to automatically create a subfolder in the downloaded zip archive, named -.zip.

I'm using a link to the tagged github zip directly in my update.xml

I'm not sure if github always added this folder in the zip file, back when it still worked for me...

Might the Joomla problem have to do with the zip file containng such a folder, and not directly the extension stuff at root level? If so, anybody know if/how I can change github to not create that subfolder?

codeling
  • 11,056
  • 4
  • 42
  • 71

2 Answers2

2

Right, just had a quick test of this.

I couldn't seem to find out how to automatically zip up a sub folder (there is a way but I need to do some more research/ask questions regarding this), however what you can do is the following:

  1. Create a zip of your Repo
  2. Open the zip, extract the folder you wish to be zipped then zip it
  3. Create a new version and then drag your zip file into the upload box
  4. Publish the release

Here is an example, have a look at the "Creating Releases" sections at the bottom:

https://github.com/blog/1547-release-your-software

Hope this helps

Lodder
  • 19,758
  • 10
  • 59
  • 100
  • Thanks for that description&link! I can attach a zip file now, but how can I get that file? I see no link for it with the release; that still shows the link to the automatically created zip with subfolder. Edit: I don't get this nice green download button added to the release :(. Does it maybe have to be a binary file to show up? – codeling Dec 10 '13 at 08:54
  • Nope, at least just renaming a file to .exe doesn't help. In general the interface for releases still seems to be buggy. When I upload a file, it doesn't show up even in the editing interface, only after I press "Update release" and edit again... and in the "non-editing", normal view of the release it never shows up, tried hard-refresh (CTRL+F5), to no avail :( – codeling Dec 10 '13 at 09:00
  • attached a "real" binary, still doesn't show up. Maybe they check it for viruses in the background, or manually check the file before making it publicly available? I'm going to wait a while and see what happens. At the moment though, this seems dysfunctional – codeling Dec 10 '13 at 09:07
  • To view and download the zip file that you have uploaded, click on "Releases" and then the download button for that specific version will be green. Have a look for for an example: https://github.com/JoomJunk/Social-Slider/releases – Lodder Dec 10 '13 at 09:19
  • That's the thing - for me, no such nice green download button appears, even after several tries with several different files. Doesn't matter if I create a new release or edit an existing one, there just is no such download button, no matter which or how many files I try to upload! Do you have paid account on github maybe? – codeling Dec 10 '13 at 10:41
  • hmm that's really odd. are you sure you're extracting the master xip and re-zipping it before uploading? – Lodder Dec 10 '13 at 10:45
  • I have tried with several different files now, not only with a re-zipped version. You're getting at that github might check if the automatically created zip and the uploaded one are the same, and you think it would discard my uploaded file for that case? Haven't tried that specifically, but as I said, tested with completely different files (e.g. a small test program I wrote for a c++ question here on SO), and none showed up. Possibly a bug in github? – codeling Dec 10 '13 at 10:48
  • It could possibly be a bug in github, I'm not too sure as I haven't seen any issues regarding this. The only thing I can think of is if you give me temporary permissions on your github repo so I can test, but that is of course entirely up to you. – Lodder Dec 10 '13 at 10:50
  • I contacted github now. Let's see what they say :D. Thanks for the offer though – codeling Dec 10 '13 at 11:14
  • Turns out it was an issue with NoScript blocking amazon s3 scripts (where they host the files). Works now! Thanks! – codeling Dec 10 '13 at 14:08
  • Unfortunately I had to notice that github release assets don't work with automatic extension update - an 505 error is thrown :(. See http://stackoverflow.com/questions/20984019/automatic-extension-update-cant-handle-zip-file-from-github/21197203?noredirect=1#comment31958634_21197203 – codeling Jan 19 '14 at 21:29
1

To answer my own question:

Yes, github seems to have recently changed their policy to create a root folder in the zip file, named as the repository the zip file is downloaded for (stupid, if you ask me, since the exact same information is encoded in the zip file name already anyway!).

Edit and Rewrite: It seems that either something changed in Joomla or that if you adhere to a naming convention - namely the root folder in the zip file having the exact extension name (or, I think and have to test, actually the same as the file name, without the version information), then the automatic update will work.

So as in my case, I have a Joomla package; the package is now in a repository pkg_mypkg. The zip file generated by github has the name pkg_mypkg-version.zip (e.g. pkg_myfancyext-1.0.9.zip), and contains a folder named pkg_mypkg. And inside the pkg_mypkg folder is a pkg_mypkg.xml file, the extension manifest. And this actually seems to be the configuration where automatic update works.

codeling
  • 11,056
  • 4
  • 42
  • 71
  • There is actually a way to have zipped versions on github which purely zips the module folder rather than making it a sub folder. I've seen it done with a few components on github. I can find out for you if you want – Lodder Dec 03 '13 at 23:39
  • @Lodder that would be awesome, and I would upvote and accept such an answer! – codeling Dec 09 '13 at 11:27