New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install extensions referenced by a github link to a tarball, only zipball links work #1296

Closed
Lucas-C opened this Issue Aug 11, 2015 · 10 comments

Comments

Projects
None yet
5 participants
@Lucas-C

Lucas-C commented Aug 11, 2015

Hi,

I found out about this while trying to install "dokufreaks/plugin-include" from the Extension Manager.
I got an error stating "Unable to identify extension directory, you need to download and install manually".

Then I found out this issue only arise with an extension where the "install" button point to a tarball, not for an extension where the link points to a zipball.

I suspect that, at this line of code:
https://github.com/splitbrain/dokuwiki/blob/master/lib/plugins/extension/helper/extension.php#L870
an silent error occur during the archive decompression.

This recent commit is probably the culprit :)
605f8e8#diff-441b0afb846829ac54893372ccbaa72c

The same error has been observed in this issue, where the link point to a tarball:
michitux/dokuwiki-plugin-outliner#17

@Lucas-C

This comment has been minimized.

Show comment
Hide comment
@Lucas-C

Lucas-C Aug 11, 2015

With some traces I found out the extension is guessed to be 'gz'.
But are tar.gz archives supported ?

Lucas-C commented Aug 11, 2015

With some traces I found out the extension is guessed to be 'gz'.
But are tar.gz archives supported ?

@Klap-in

This comment has been minimized.

Show comment
Hide comment
@Klap-in

Klap-in Aug 12, 2015

Collaborator

The archive library used by Dokuwiki is today: https://github.com/splitbrain/php-archive
It is a rewrite of the previous one, sofar I know it should handle .tar.gz fine.
So maybe somewhere an bug is introduced?

Collaborator

Klap-in commented Aug 12, 2015

The archive library used by Dokuwiki is today: https://github.com/splitbrain/php-archive
It is a rewrite of the previous one, sofar I know it should handle .tar.gz fine.
So maybe somewhere an bug is introduced?

@splitbrain

This comment has been minimized.

Show comment
Hide comment
@splitbrain

splitbrain Aug 12, 2015

Owner

See splitbrain/php-archive#10

From what I see so far, github's tar files are wrong. But I'm still investigating.

Owner

splitbrain commented Aug 12, 2015

See splitbrain/php-archive#10

From what I see so far, github's tar files are wrong. But I'm still investigating.

@splitbrain

This comment has been minimized.

Show comment
Hide comment
@splitbrain

splitbrain Aug 12, 2015

Owner

Okay it get's weirder. I can download that file and extract it with the Tar class without any problems. The downloaded file has the same MD5 as the one DokuWiki downloads, but within DokuWiki the header checksum fails.

Owner

splitbrain commented Aug 12, 2015

Okay it get's weirder. I can download that file and extract it with the Tar class without any problems. The downloaded file has the same MD5 as the one DokuWiki downloads, but within DokuWiki the header checksum fails.

@Lucas-C

This comment has been minimized.

Show comment
Hide comment
@Lucas-C

Lucas-C Aug 12, 2015

Have you checked that the extracted directory is not empty ?
Because I oberserved that.

Also, I was able to tar -xzvf the github tarball without any issue

Lucas-C commented Aug 12, 2015

Have you checked that the extracted directory is not empty ?
Because I oberserved that.

Also, I was able to tar -xzvf the github tarball without any issue

@splitbrain

This comment has been minimized.

Show comment
Hide comment
@splitbrain

splitbrain Aug 12, 2015

Owner

Found the problem. Since the file is named master the library fails to guess the compression type correctly. Fix is in the work

Owner

splitbrain commented Aug 12, 2015

Found the problem. Since the file is named master the library fails to guess the compression type correctly. Fix is in the work

@gamma

This comment has been minimized.

Show comment
Hide comment
@gamma

gamma Aug 13, 2015

Contributor

Are there any updates on this issue? I think this is a serious one a and should justify a hot fix.

Contributor

gamma commented Aug 13, 2015

Are there any updates on this issue? I think this is a serious one a and should justify a hot fix.

@splitbrain

This comment has been minimized.

Show comment
Hide comment
@splitbrain

splitbrain Aug 13, 2015

Owner

Yeah. Maybe a hotfix would be in order. Can you suggest it on the mailing list?

Owner

splitbrain commented Aug 13, 2015

Yeah. Maybe a hotfix would be in order. Can you suggest it on the mailing list?

@Lucas-C

This comment has been minimized.

Show comment
Hide comment
@Lucas-C

Lucas-C Aug 13, 2015

Thanks for the fix !

Lucas-C commented Aug 13, 2015

Thanks for the fix !

@LarsGit223

This comment has been minimized.

Show comment
Hide comment
@LarsGit223

LarsGit223 Aug 27, 2015

Collaborator

Is this really fixed?

I'm on Release 2015-08-10a "Detritus" and noticed today that I can not install the Creole plugin. I changed the link on the page to zipball and then it worked.

Also I have to mention the extension manager did not give any error message after installing the plugin. It said installation was successful. But I noticed the Creole plugin didn't work. I wanted to check the plugin configuration and noticed the Creole plugin was not listed on the config page. Then I did go back to the extension manager again and noticed the plugin was installed but disabled. I clicked on enable but the page just re-loaded and the enable button was still shown. That means I could not enable the plugin.

As mentioned above, everything worked fine as soon as I changed the download link to zipball.

Collaborator

LarsGit223 commented Aug 27, 2015

Is this really fixed?

I'm on Release 2015-08-10a "Detritus" and noticed today that I can not install the Creole plugin. I changed the link on the page to zipball and then it worked.

Also I have to mention the extension manager did not give any error message after installing the plugin. It said installation was successful. But I noticed the Creole plugin didn't work. I wanted to check the plugin configuration and noticed the Creole plugin was not listed on the config page. Then I did go back to the extension manager again and noticed the plugin was installed but disabled. I clicked on enable but the page just re-loaded and the enable button was still shown. That means I could not enable the plugin.

As mentioned above, everything worked fine as soon as I changed the download link to zipball.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment