Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix/child export #471

Merged
merged 2 commits into from
Nov 13, 2023
Merged

Fix/child export #471

merged 2 commits into from
Nov 13, 2023

Conversation

pbking
Copy link
Contributor

@pbking pbking commented Nov 6, 2023

Fixes issues described in the forum here: https://wordpress.org/support/topic/resulting-zip-file-has-no-name/

This change fixes two issues, both related to exporting CHILD themes.

Testing

  • Activate a CHILD theme. For my testing I activated Twenty Twenty Three, changed a background color and (using the CBT wp-admin menu) created a Child Theme of Twenty Twenty Three (called TT Child). I then imported and activated this new child theme.
  • Make changes to the newly activated child theme's Global Styles (such as changing the background color).

Scenario 1 (wp-admin interface)

  • From the wp-admin CBT menu export the current theme.
  • The theme exported should have the correct filename (such as tt4child.zip) rather than an incomplete file (such as .zip as was reported).
  • The contents of the .zip file should be ONLY those resources necessary for the child theme (no unnecessary templates, etc that are contained in the parent theme). (This had previously worked as expected, there should be no change here.)

Scenario 2 (Site Editor interface)

  • From the Site Editor CBT menu export the current theme.
  • The theme exported should have the correct filename. (This previously worked as expected, there should be no change here.)
  • The contents of the .zip file should be ONLY those resources necessary for the child theme (no unnecessary templates, etc that are contained in the parent theme).

@pbking pbking self-assigned this Nov 6, 2023
Copy link
Member

@mikachan mikachan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this is testing well for me! Here's my test report:

I ran through your testing instructions without this PR and can confirm I could reproduce the issues you mentioned.

Then with this PR:

Scenario 1 (wp-admin interface)

From the wp-admin CBT menu export the current theme.

  • The theme exported should have the correct filename (such as tt4child.zip) rather than an incomplete file (such as .zip as was reported). ✅
  • The contents of the .zip file should be ONLY those resources necessary for the child theme (no unnecessary templates, etc that are contained in the parent theme). ✅

Scenario 2 (Site Editor interface)

From the Site Editor CBT menu export the current theme.

  • The theme exported should have the correct filename. ✅
  • The contents of the .zip file should be ONLY those resources necessary for the child theme (no unnecessary templates, etc that are contained in the parent theme). ✅

@mikachan
Copy link
Member

It's maybe worth mentioning that I've only tested using TT3 - maybe it's worth testing this with at least one other theme.

@pbking
Copy link
Contributor Author

pbking commented Nov 13, 2023

I just tested with Geologist (a blockbase child) and it all worked as I expected in both interfaces. That's about the most complex child theme relationship we have and considering that I think we're safe to bring this in.

@pbking pbking merged commit a692b6b into trunk Nov 13, 2023
1 check passed
@mikachan mikachan deleted the fix/child-export branch November 13, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants