Skip to content
New issue

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

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

Already on GitHub? # to your account

Unexpected results in exported ZIP #612

Open
erikjoling opened this issue May 1, 2024 · 3 comments
Open

Unexpected results in exported ZIP #612

erikjoling opened this issue May 1, 2024 · 3 comments

Comments

@erikjoling
Copy link

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
Copy link
Contributor

pbking commented May 2, 2024

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
Copy link
Author

erikjoling commented May 3, 2024

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
Copy link
Contributor

t-hamano commented Jun 9, 2024

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.

  • Initialize your local environment once.
  • Export the theme from the plugin sidebar of the site editor. If you check the zip file, you will see the following contents.
    image
  • Make changes to the Blog Home template and save it.
  • Export the theme from the plugin sidebar of the site editor. If you check the zip file with the two programs, you will see the following contents.
    • 7-zip:
      7-zip
    • WinRar:
      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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants