WordPress / wordcamp.org

WordCamps are casual, locally-organized conferences covering everything related to WordPress.
https://wordcamp.org
126 stars 74 forks source link

Update Site Cloner #1315

Open renintw opened 5 months ago

renintw commented 5 months ago

Describe the bug

https://wordpress.slack.com/archives/C08M59V3P/p1715272078520129

Details pending completion.

pkevan commented 1 month ago

@renintw did you get anywhere with this? It's come up a few times that block themes don't clone easily - it was suggested that the create block theme community plugin could get us someway there.

pkevan commented 3 weeks ago

when attempting to clone a block theme (tt4) noting some things i'm noticing missing:

If content/media isn't cloned is it a true clone of another site?

renintw commented 3 weeks ago

When I previously helped develop the website, and from feedback I saw over time, it doesn't matter if content and media aren't cloned. But patterns, template parts, and templates are important and really what people want. The remote CSS location doesn't need to be cloned either since a new folder should be created each time.

renintw commented 2 weeks ago

Some findings:

  1. The site cloner in the local environment is not functioning.
  2. The customizer additional CSS and the site editor’s additional CSS in the local environment cannot be opened. Attempts to fix deprecated functions, upgrade the WordPress version, database, and plugins did not resolve the issue. Currently, both the sandbox and production environments are functioning correctly. It is suspected that the issue stems from the setup process of the local environment.
  3. How the current clone works:
    1. The target site switches the theme to the theme of the cloned site.
    2. Editor styles like: a. Variations b. Colors c. Shadows d. Layout e. Block settings f. Additional CSS are not cloned.
    3. The customizer’s Additional CSS is cloned to the target site’s Customizer’s Additional CSS.
    4. Remote CSS (such as specified GitHub CSS file) is also cloned to the target site’s Customizer’s Additional CSS.
    5. The input in Appearance -> Fonts is not cloned.
    6. The input in Appearance -> Remote CSS is not cloned, but as mentioned above, the CSS content is directly cloned to the customizer’s additional CSS.
    7. All Post Types, CPT posts, and media are not cloned.
renintw commented 2 weeks ago

Testing the "Create Block Theme" plugin:

  1. The exported ZIP file does not include the patterns and templates added to the site.
  2. The plugin itself does not provide an import feature.
StevenDufresne commented 2 weeks ago

The exported ZIP file does not include the patterns and templates added to the site.

I'm pretty certain it should.

renintw commented 1 week ago

I'm pretty certain it should.

I retested this locally rather than on the testing site again. Patterns didn't get exported. As for custom templates, they will be exported with the prefix 'wp-custom-template'.

Update Found that patterns are exported only after the "Save Changes" in the Create Block Theme tool is pressed. Initially, the default settings appear as shown in the image, but they won't take effect until "Save Changes" again. However, if users create patterns without selecting "synced," those patterns still won't be exported.

image

Additionally, any images added to the site must have the "Localize Images" option selected in order to be exported.