WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.46k stars 4.18k forks source link

Pattern Import Failure y.values ().find is not a function. #65347

Open jasperf opened 1 month ago

jasperf commented 1 month ago

Description

I exported my WordPress block pattern, tried to import the pattern on other WordPress site and got this error:

y.values ().find is not a function. (In 'y.values).find ((e=>e.name===n)); 'y.values().find' is undefined

I validated the JSON at https://jsonlint.com/ and it is valid. File to be checked is here https://gist.github.com/jasperf/4747e963fc84871ea6f3482ddf37381e I added the custom line block it is used as must-use plugin as well as the cover filter and with those deactivated still the same error on import. This is a major problem for me.

Worked on this menu pattern for a long time and I need to be able to export it. Using it locally and synch one used on a page with the actual pattern and that works well. But I need to be able to use it elsewhere.

NB Also tried pattern with cover part turned into group https://gist.github.com/jasperf/f062895598240a4c4704e7b15057456f . But still same error

Step-by-step reproduction instructions

  1. go to patterns
  2. import pattern json from https://gist.github.com/jasperf/4747e963fc84871ea6f3482ddf37381e
  3. see error (In 'y.values).find ((e=>e.name===n)); 'y.values().find' is undefined

Screenshots, screen recording, code snippet

Screenshot 2024-09-14 at 10 56 27

Environment info

macOS Sonoma, Safari 17.6, WordPress 6.6.2, PHP 8.2.15

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

jasperf commented 1 month ago

I just tried import using the latest Chrome Version 128.0.6613.138 (Official Build) (arm64). And there import does work. Tried a few versions of the file. Only lose the custom fonts set but import location only uses basic Twenty Fourteen theme so makes sense.

backit commented 2 weeks ago

same here!! firefox 130.0.1 on linux ubuntu, wp 6.6.2