Automatic Extension Update: Unknown Archive type

∥☆過路亽.° 提交于 2019-12-25 05:00:33

问题


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?


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/20362958/automatic-extension-update-unknown-archive-type

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!