WordPress / create-block-theme

A WordPress plugin to create block themes
https://wordpress.org/plugins/create-block-theme/
GNU General Public License v2.0
310 stars 44 forks source link

Unexpected results in exported ZIP #612

Open erikjoling opened 2 months ago

erikjoling commented 2 months ago

Hi,

Prequisite: I'm using Windows 11 and LocalWP.

When I export the theme using the Site Editor the name of the themefolder inside the ZIP is not the same as my installed theme. It seems like it uses the textdomain as a foldername. When using the legacy settings page (Appearance > Create Block Theme) the themefolder has the correct name.

Furthermore, the themefolder inside the ZIP file contains an empty folder (root?) with type "local disk". This file contains some of my image assets.

image

pbking commented 2 months ago

When using the legacy settings page (Appearance > Create Block Theme) the themefolder has the correct name.

What is the name of the folder you are expecting if not the theme's slug?

Could you share the .zip file that was created?

That "Local Disk" you're showing is certainly interesting.

erikjoling commented 2 months ago

When using the legacy settings page (Appearance > Create Block Theme) the themefolder has the correct name.

What is the name of the folder you are expecting if not the theme's slug?

I would expect the same folder name as the current folder name of the theme. In my example the theme's folder is named hetgroenedoel but the themefolder inside the exported .zip file is named hgd, which is my theme's slug or textdomain.

That "Local Disk" you're showing is certainly interesting.

After changing some of the theme files the "Local Disk" (root) folder was gone. I'll let you know if it happens again.

t-hamano commented 3 weeks ago

Furthermore, the themefolder inside the ZIP file contains an empty folder (root?) with type "local disk". This file contains some of my image assets.

I was able to reproduce this issue with the default theme. The results of the test may vary depending on the type of file archiver, but I was able to reproduce it with two archivers: 7-zip and WinRar.

The difference here is that the latter zip file contains an unintended assets directory, which has an image directory, which contains some images:

image

Furthermore, if I think about what these images are related to, they are included in the updated Blog Home template.

Perhaps this point will give us a clue to solving the problem.