• Resolved Jamie S

    (@spacedragon)


    The exported .ZIP file won’t open on Mac.

    Archive Utility keeps throwing this error: ‘Unable to expand “theme.zip”. It is in an unsupported format.’

    I also exported from different browsers with the same results. Seems broken.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Same problem here, Archive Utility mumbling about ?unsupported format?, BetterZip also doesn’t open the file.

    Opening the file in BBEdit shows that a PHP error has apparently been saved into the beginning of the zip file:

    <br />
    <b>Warning</b>:  ZipArchive::addFile(): No such file or directory in <b>/Users/philby/Sites/FSE/wp-content/plugins/create-block-theme/admin/class-create-block-theme-admin.php</b> on line <b>237</b><br />

    NB: exporting the activated theme with user changes as full theme does work, but exporting as child theme and cloning the theme show this behaviour.
    Exporting the theme does not try to add the screenshot.png to the zip file, which is where cloning and creating a child theme seem to break.

    If I was to guess, I’d say that the __DIR__ in

    		$zip->addFile(
    			__DIR__ . '/../screenshot.png',
    			'screenshot.png'
    		);

    points to some plugin directory and not the theme dir, which is why screenshot.png can’t be found.

    • This reply was modified 2 years, 8 months ago by philbee.

    NB: exporting the activated theme with user changes as full theme does work, but exporting as child theme and cloning the theme show this behaviour.

    Plugin Author Maggie Cabrera

    (@onemaggie)

    Does this still happen to you? It should be fixed with the latest version of the plugin.

    Thread Starter Jamie S

    (@spacedragon)

    Looks like the fix works. Thank you!

    The plugin still throws errors when exporting a child theme:

    Warning: ZipArchive::addFile(): No such file or directory in /www/doc/www.h2ospodar.cz/www/wp-content/plugins/create-block-theme/admin/class-create-block-theme-admin.php on line 242
    
    Warning: Cannot modify header information - headers already sent by (output started at /www/doc/www.h2ospodar.cz/www/wp-content/plugins/create-block-theme/admin/class-create-block-theme-admin.php:242) in /www/doc/www.h2ospodar.cz/www/wp-content/plugins/create-block-theme/admin/class-create-block-theme-admin.php on line 247
    
    Warning: Cannot modify header information - headers already sent by (output started at /www/doc/www.h2ospodar.cz/www/wp-content/plugins/create-block-theme/admin/class-create-block-theme-admin.php:242) in /www/doc/www.h2ospodar.cz/www/wp-content/plugins/create-block-theme/admin/class-create-block-theme-admin.php on line 248
    
    Warning: Cannot modify header information - headers already sent by (output started at /www/doc/www.h2ospodar.cz/www/wp-content/plugins/create-block-theme/admin/class-create-block-theme-admin.php:242) in /www/doc/www.h2ospodar.cz/www/wp-content/plugins/create-block-theme/admin/class-create-block-theme-admin.php on line 249
    PK?\U??;w theme.json{ "version": 2 }PK?\U??? y readme.txt}R???0??+?[?@#Um?rH),?X?B?h?Ib?S?Y?~}?a)UU???7o?{3Q?:??N??@El??3??;m???

    It works most of them expect creating child theme. The zip file can’t open. Here is error massage”Unable to expend “test.zip”.It is in an unsupported format.” I am using macBook pro MacOS Monterey version 12.6

    Also having this issue. Just using a “Clone Twenty Twenty-Three” option on a clean install on Mac. WP running on “Local” app.

    I see this flagged as resolved, but I’m still getting this error. This happens with creating a child theme and cloning.

    • This reply was modified 2 years, 2 months ago by adrigrace.

    @adrigrace, @themico, @yowangdu
    I enjoyed the same problem, try unzip the file from the terminal


    1. create new folder
    2. place zip inside
    3. navigate to the folder from the terminal & write the command ??</img>

    unzip [file name]

    works for me, i hoop it will works for you

    Darn! I was hopeful this would work, but I get the following message:

    ?End-of-central-directory signature not found.? Either this file is not a zipfile, or it constitutes one disk of a multi-part archive.? In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive.

    Thread Starter Jamie S

    (@spacedragon)

    Can confirm the issue regressed when cloning Twenty Twenty-Three on clean “Local” app install on Mac.

    pax

    (@u8ik)

    See: Zip File is corrupt when define( ‘WP_DEBUG’, true);
    Getting rid of debug notices fixed it for me.

    Thread Starter Jamie S

    (@spacedragon)

    I’m no longer experiencing this issue on version 1.6.1. Works regardless of Debugging status.

    Moderator Kathryn Presner

    (@zoonini)

    @spacedragon Great, glad to hear the issue is resolved for you – and thanks for returning to share that.

    Since this thread is now marked as resolved, if anyone is continuing to have this issue, please make a new post. Thanks!

    1.7.1 not working for me, trying to create a child theme “Unable to expand … unsupported format”
    then I tried @janayby terminal trick but go the same response as @adrigrace
    End-of-central-directory signature not found.? Either this file is nota zipfile, or it constitutes one disk of a multi-part archive.? In thelatter case the central directory and zipfile comment will be found onthe last disk(s) of this archive.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Exported .ZIP corrupt on Mac?’ is closed to new replies.