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 json import and export has stopped working on Wordpress.COM #68367

Closed
3 of 6 tasks
JungleGenius opened this issue Dec 28, 2024 · 4 comments · Fixed by #68388
Closed
3 of 6 tasks

Pattern json import and export has stopped working on Wordpress.COM #68367

JungleGenius opened this issue Dec 28, 2024 · 4 comments · Fixed by #68388
Assignees
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

@JungleGenius
Copy link

Description

Hi All,
I'm just a random user of Wordpress.COM but considering this is the last commit to this file and the pattern json import and export was working up until two weeks ago I think this commit may have broken it. On Wordpress.COM I can no longer import pattern json files because I now get the following error "e.getLocationWithParams is not a function". I've tried contacting support over on Wordpress.COM as I have a paid hosting with them but their support is AWOL so I'm dropping this here. I may be wrong and if I am I apologize.

Step-by-step reproduction instructions

On Wordpress.COM export a pattern json
Then on Wordpress.COM import a pattern json
Now you get the following error "e.getLocationWithParams is not a function".

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@JungleGenius JungleGenius added the [Type] Bug An existing feature does not function as intended label Dec 28, 2024
@himanshupathak95
Copy link
Contributor

himanshupathak95 commented Dec 30, 2024

Hey @JungleGenius, I also got the same error after importing the just exported pattern -

1.png

After testing the same on the trunk, I found out that it is actually history.getLocationWithParams is not a function

I will first see if there is any issue for this already, and if there isn't I'll start working on the solution.

@t-hamano t-hamano added the [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced label Dec 30, 2024
@tyxla
Copy link
Member

tyxla commented Dec 30, 2024

I can reproduce this on trunk and have a fix coming up.

@tyxla
Copy link
Member

tyxla commented Dec 30, 2024

Here's a fix: #68388

@JungleGenius
Copy link
Author

Hi Folks @ramonjd @tyxla @himanshupathak95,

Thanks you for the swift response and bug fix. I was trying to get a landing/order page up over the Holliday when I ran headlong into this bug.

I am really impressed with your team's actions once I got the bug got on your radar. (The front line Wordpress.COM user support was lacking, but it look like the dev team is really on the ball response wise).

Normally I would just create a pull request for the bug fix like I did for the Groundhog plug-in over here, but I'm not currently setup for WordPress core development (I mostly do Laravel and CodeIgniter).

The theme/plug-in editor won't let me view or debug the core files so I was kind of stuck. I ended up pasting the JSON into the pages manually to work around this, but it was buggy because the block editor needs to "resolve" the pasted json code.

I think you are going to need a dot release to get this into Wordpress.COM in the short term.

Thanks everyone. Great work.

-Daniel

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

Successfully merging a pull request may close this issue.

4 participants