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

How to change or replace registered block name #17372

Closed
alpezed opened this issue Sep 8, 2019 · 5 comments
Closed

How to change or replace registered block name #17372

alpezed opened this issue Sep 8, 2019 · 5 comments
Labels
[Feature] Block API API that allows to express the block paradigm. [Type] Help Request Help with setup, implementation, or "How do I?" questions.

Comments

@alpezed
Copy link

alpezed commented Sep 8, 2019

Is your feature request related to a problem? Please describe.
I've created a block like bb-gutenberg/box but i have a dynamic block already with prefix better-gutenberg/box. After updated my block to better-gutenberg/box name it breaks everything.

Describe the solution you'd like
I just want to update my block from bb-gutenberg/box name to better-gutenberg/box name without breaking my old content that using old block name (bb-gutenberg/box)

@swissspidy swissspidy added [Type] Help Request Help with setup, implementation, or "How do I?" questions. [Feature] Block API API that allows to express the block paradigm. labels Sep 10, 2019
@swissspidy
Copy link
Member

Hi there!

For general help requests, please post in the support forum at https://wordpress.org/support/forum/how-to-and-troubleshooting/.

Technical help requests have their own section of the support forum at https://wordpress.org/support/forum/wp-advanced/.

You may also ask for technical support at https://wordpress.stackexchange.com/.

Please make sure you have checked the Handbook at https://wordpress.org/gutenberg/handbook before asking your question.

For your specific case, please check out https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#transforms-optional and https://developer.wordpress.org/block-editor/developers/block-api/block-deprecation/ for documentation.

@alpezed
Copy link
Author

alpezed commented Sep 10, 2019

Hi, sorry but what i need exactly is change my block from bb-gutenberg/box namespace to better-gutenberg/box, but it breaks everything because the bb-gutenberg/box is missing.

Screenshot

2019-09-10_1920

@simonhammes
Copy link
Contributor

Maybe it would be an option to add a name property to objects in the deprecated property of the new block to accommodate a new block name?

@alpezed
Copy link
Author

alpezed commented Sep 10, 2019

Yes something like that, that will be great if you can add a name property to objects in the deprecated property so i can update or change my block name because i have some other block also that i want to update and change the block name.

@alpezed alpezed changed the title Change Block Name How to change registered Block Name Oct 2, 2019
@alpezed
Copy link
Author

alpezed commented Oct 2, 2019

Is there any other alternative way to do this? like search the '<!-- wp:bb-gutenberg' and replace with '<!-- wp:better-gutenberg' so the old block name was replace by "<!-- wp:better-gutenberg".

@alpezed alpezed changed the title How to change registered Block Name How to change or replace registered block name Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Type] Help Request Help with setup, implementation, or "How do I?" questions.
Projects
None yet
Development

No branches or pull requests

3 participants