Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

'Export to JSON' not working on simple sites #89596

Closed janmckell closed 2 months ago

janmckell commented 7 months ago

Quick summary

'Export to JSON' is not working on Classic and Hybrid themes

I realized that whether the pattern is synced or un-synced did not matter, but that 'Export to JSON' only works when I changed to a Universal or Block theme, and was in the Site Editor, instead. Note: From the Classic/Hybrid theme view, ‘Import from JSON’ did not work either.

Screenshots: Custom Patterns list in a site with a Classic or Hybrid theme Markup on 2024-04-16 at 6_10_01 PM

My Patterns in Appearance → Editor in a site with a Universal or Block theme Markup on 2024-04-16 at 6_08_24 PM

Steps to reproduce

  1. Install and activate a Classic or Hybrid theme
  2. Go to Appearance → Patterns
  3. Click on 'Export to JSON' beneath one of the patterns
  4. Nothing happens
  5. You can also try importing a JSON file for a pattern and that doesn't work either.

What you expected to happen

I expected the JSON file to export or to import upon clicking the buttons for those actions.

What actually happened

Nothing at all happened.

Impact

Some (< 50%)

Available workarounds?

No and the platform is unusable

Platform (Simple and/or Atomic)

Simple, Atomic

Logs or notes

No response

mrfoxtalbot commented 7 months ago

I can confirm this on my testing simple site but I am seeing something slightly different. Exporting patterns does NOT work on simple sites via wp-admin/edit.php?post_type=wp_block at all

  1. Go to wp-admin/edit.php?post_type=wp_block
  2. Click on Export as JSON
  3. Notice how nothing happens

I tried this with Twenty Seventeen and with Twenty Twenty-Four and neither works.

I also tried this on a self-hosted and Atomic sites and it works fine with both Twenty Seventeen and with Twenty Twenty-Four.

Robertght commented 6 months ago

8213552-zen patterns don't work.

github-actions[bot] commented 6 months ago

Support References

This comment is automatically generated. Please do not edit it.

annezazu commented 2 months ago

Checking into this and, thanks to WordPress 6.6 bringing a modern pattern experience to classic themes, I think we can close this. I wasn't able to replicate on a test site when switching a theme to Twenty Twenty (classic) and heading to Patterns.

https://github.com/user-attachments/assets/6c6285bc-8cc4-496a-ae9f-c2cf5bb27d38