WordPress.org

Ready to get started?Download WordPress

Forums

Plugin/theme installation - The package is corrupt or not in the correct format. (10 posts)

  1. Kezz Bracey
    Member
    Posted 2 years ago #

    I am testing 3.3-beta1 on a localhost running on XAMPP.

    With certain zips I get the following error from theme / plugin upload installation:

    Unpacking the package…

    Installing the [theme/plugin]…

    The package is corrupt or not in the correct format.

    Theme install failed.

    I have all versions from 2.9.2 through to 3.3-beta1 running on the same XAMPP localhost setup.

    All plugin and theme installations I am testing with the same zip files work a-okay on other versions.

    I have tested zips archived using 7zip, WinRAR, the default Windows compressor, and archives created via cPanel's File Manager. All these failed.

    Zips downloaded from the repository work a-okay, but they are the only ones I can find that will install.

    After encountering this issue on a XAMPP localhost I setup a test installation online.

    I encountered all the same issues online as well.

    This is my first round taking part in the beta testing, so wanted to get some feedback before posting it on Trac.

  2. Dennis
    Member
    Posted 2 years ago #

    Hi All,

    I just experienced the same problem with installing a theme and I think I know the reason - it is because the file structure. So, with the WordPress 3.3 Beta 1, it works only with the following structure within the zip:

    theme-name.zip
    -theme-name(folder)
    --style.css
    --index.php

    but it doesn't work with files directly located within the zip file (which does with the previous versions):

    theme-name.zip
    -style.css
    -index.php

    I think such a change will cause lots of problems and maybe this is not the right way to set a convention about the zip structure.
    It's the same as completely deleting a function that you don't want to be used anymore, instead of making it "deprecated". Maybe if something worked in one way in previous versions, it should work for the future ones as well and if you would like to change the way it works, maybe it would be better to be done with some kind of warnings, etc. but not with completely removing this functionality and as this case, make many users not be able to install their themes and plugins.
    I hope this can be fixed.

  3. Are these themes from the wp repo?

    If so, then yes, this is a problem. If not... well they were 'doin' it wrong' to begin with.

  4. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    @ipstenu:

    If so, then yes, this is a problem. If not... well they were 'doin' it wrong' to begin with.

    I completely agree.

    That said: the error message is WAY too vague for such a change. It should at least indicate that the problem is a lack of a containing directory in the ZIP file.

    Is there a related Trac ticket I can comment on?

  5. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    Perhaps this is the appropriate ticket:
    http://core.trac.wordpress.org/ticket/14999

    Note the last several comments, regarding user-targeted error messages on Theme-upload failure.

  6. That ticket looks right.

    Mind you "The package is corrupt or not in the correct format." is exactly what's wrong. I don't know that a more verbose explanation will help the person installing (assuming that the person isn't a dev). I don't know how you'd word it, briefly, to explain "This package was made wrong. Go tell the dude who made it."

  7. Chip Bennett
    Theme Review Admin
    Posted 2 years ago #

    Mind you "The package is corrupt or not in the correct format." is exactly what's wrong.

    Well, except that the package isn't corrupt. :)

    It's in the wrong format, as WordPress now defines "correct", but it's definitely not "corrupt". So, I can see such a statement not only being confusing, but also misleading.

    I'll leave the wordsmithing and bike-shedding to the Trac ticket, but IMHO, it would seem simple enough to state something user-friendly, such as:

    The package is not in the correct format. WordPress Themes are required to be packaged with their files inside a folder.

  8. Dennis
    Member
    Posted 2 years ago #

    @Ipstenu

    Are these themes from the wp repo?

    - No

    If not... well they were 'doin' it wrong' to begin with.

    - The problem is that if this is "wrong", why it did work on the previous versions? If it wasn't meant to be like this, this error message should have been implemented in the same version when the theme zip uploading functionality was created and not leaving developers create different zip structures and do it "wrong".
    And once they let us do it "wrong" and one day decide to change it - it just should be in a manner that it doesn't break our themes/plugins.

  9. Kezz Bracey
    Member
    Posted 2 years ago #

    Thanks dennis_f, you were right that was the issue. I repackaged the items I was testing with and they worked.

    For the most part, there is no need to manually upload a plugin that comes from the repository, as obviously you would typically just use the direct installation process instead.

    However there are many thousands of themes and plugins that, for various and completely valid reasons, don't reside in the repository. Or, that do reside in the repository but perhaps also directly from the creator's website. Both of these cases were true in the items I was testing with.

    In the past, if an archive did not have a containing folder inside, WordPress would still just extract into a folder of the same name as the zip file.

    Could this not still be the case given that the resulting installations work just fine as long as all the actual functional files are in order?

    Otherwise, there will be a whole lot of headaches out there for folks seeing the type of message I saw, with no way to know it was something as simple as a folder being missing.

    Sure, it may be "wrong" to have a missing folder.

    But if forcing it to be "right" causes an increase in malfunctions and issues for users, where working around it being "wrong" allows things to hum along smoothly for the most part, then perhaps a workaround actually leads to best practical results.

  10. If you're doing something 'wrong' and no one noticed that if happened to work, it's a very iffy area. Y'know? Anyway, we have it up in the ticket :) So it's at that stage right now.

    IF you can link to a plugin/theme that's causing the problem, please post that URL on http://core.trac.wordpress.org/ticket/14999 so we can have a record and something KNOWN to test with.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.