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

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

Closed
2 tasks done
jasperf opened this issue Sep 14, 2024 · 5 comments
Closed
2 tasks done

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

jasperf opened this issue Sep 14, 2024 · 5 comments
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Bug An existing feature does not function as intended

Comments

@jasperf
Copy link

jasperf commented Sep 14, 2024

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.

  • Yes

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

  • Yes
@jasperf jasperf added the [Type] Bug An existing feature does not function as intended label Sep 14, 2024
@Mamaduka Mamaduka added the [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced label Sep 14, 2024
@jasperf
Copy link
Author

jasperf commented Sep 14, 2024

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

backit commented Oct 4, 2024

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

@ntsekouras
Copy link
Contributor

I tested in both 6.6 and 6.7RC and could import the pattern without errors..

Noting though that I hadn't installed the line block.. I'm not sure if that would create some errors on parsing.

@jasperf
Copy link
Author

jasperf commented Nov 13, 2024

@ntsekouras perhaps it has to be in tandem with the custom line block. Also, you did test on Safari, correct?

@ramonjd
Copy link
Member

ramonjd commented Nov 13, 2024

This bug was addressed some time back:

I retested with Gutenberg and without on Core trunk and couldn't replicate in Safari, Firefox or Chrome.

I can confirm however that the bug is present in WordPress 6.6.2.

Image

So the verdict is that #64123 didn't make it in time for the WordPress 6.6 release, which occurred on July 16, 2024, or any of the subsequent maintenance releases.

WordPress 6.7 has been released and it contains the fix.

I'll close since the fix has made it to Core.

@ramonjd ramonjd closed this as completed Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants