Support » Plugin: Create Block Theme » Exported .ZIP corrupt on Mac?

  • Resolved SpaceDragon

    (@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 6 replies - 1 through 6 (of 6 total)
  • philbee

    (@philbee)

    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 3 months ago by .
    philbee

    (@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 SpaceDragon

    (@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

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.