I was bitten by this as well, and it caused me much frustration. I had exactly the same nested block duplication problem that you described above.
I was able to solve this issue by specifying an apiVersion for my custom block.
E.g.:
registerBlockType("custom-cafe-theme/custom-column",{
apiVersion: 2, // or 3
title: "Custom Column",
attributes: {
imgID: { type: "number" },
imgUrl: { type: 'string',default: '' },
},
edit: EditComponent,
save: SaveComponent
})
Related Posts:
- Event when Modal is opened/visible
- Cannot call a class as a function in block plugin react component
- configure additonal build files in the @wordpress/create-block
- How to include jQuery and JavaScript files correctly?
- Include third party Javascript library which is not included in WordPress
- jQuery in header or footer
- How to Add a .js file Only in one specific Page Dynamically to Head
- lodash dependency in a Gutenberg plugin
- creating elements/innerblocks via rangecontrol
- Looking for callback function after Gutenberg is rendered?
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- What’s the better way to add an inline script?
- Gutenberg: useDispatch is not a function – @wordpress/data included
- Make a list with header and subtext in Gutenberg blocks
- Gutenberg – What is the best way to save/update post meta?
- Are block templates incompatible with serialize_blocks?
- How to access noticeOperations from withNotices
- How to prevent UNDO on guternberg block editor
- Do I have to worry about useState causing a re-render?
- WP Gutenberg Blocks – How to limit first/root blocks
- Creating a custom Gutenberg block with columns
- How to get boolean value from register_meta properly?
- Gutenberg: import dependency or assign from global variable?
- How to control an elements classes from multiple Gutenberg sidebar controls?
- How to only load css for used blocks on frontend
- Invalid hook call on save, not edit when using swiper slider
- Proper way to use useSelect
- Gutenberg blocks error: Each child in a list should have a unique “key” prop
- Developing the save function in Gutenberg blocks
- Gutenberg – is it ok to load dependencies multiple times?
- Preventing double loading JS scripts (like React) when developing for Gutenberg
- Pass custom props to
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- How to extend SelectControl with data from my theme
- Trigger function on Remove block or add new block in Gutenberg JavaScript
- Rerender core Templates with with ToggleControl but it doesnt recognize block type
- HTMLCollection not counting right in editor? / for loop not working on elements in DOM
- What happens/fires when you select a block in the editor?
- Is “document loaded” different on admin side than public side?
- How to use setAttributes outside of the edit function return
- why is apiFetch throwing Unhandled Promise Rejection: TypeError: Object is not a function
- Reading plugin settings in esnext wordpress block
- Gutenberg text field validation
- How can i add insertion point between inner blocks in my custom block like core blocks
- How to get the value entered in the input field in wordpres
- How react js and other Javascript Technologies works on WordPress plugin?
- Why isn’t custom sidebar panel not showing up in the Gutenberg Editor?
- Reinitiate Gutenburg’s blocks using javascript
- How can I include React useState in a custom gutenberg block plugin?
- Remove Gutenberg Buttons Block
- Insert text programmatically in WordPress Gutenberg Editor
- Javascript function defined in view.js not reachable from save.js
- How to move custom gutenberg block controls from settings to styles tab?
- How to use useSelect to retrieve the currently default fontFamily?
- move useState variable from edit.js to save.js. How do I do that?
- Gutenberg Static blocks: viewScript doesn’t import css for frontend?
- Using @wordpress/scripts 28.x with WordPress
- Gutenberg move post/page title to Editor sidebar document panel
- Is It Possible to Use the Block Editor’s Notification Feature to Send Another Notification After the Post Is Saved?
- Can you nest columns/column in a gutenberg custom template?
- User set default settings for a Block in Site Editor
- WordPress Block with Interactivity API e Preact Component
- Initial help with official “create a block” tutorial
- Why is my javascript not invoked in my hooks except wp_head?
- Display content from custom post without modifying the single template
- WordPress add_admin_page not working even parameters are correct?
- Customizer: widget-synced triggers twice
- WordPress not working on localhost
- How to Create Custom HTML Tag on Editor in `Text(HTML)` mode
- Is It Always a Best Practice to Decouple the Frontend from the Admin Area When Developing a WordPress Application?
- Where to call wp_enqueue_script in a plugin with custom template?
- Can I change header.php of current theme through a plugin function?
- Creating a Link Text like Submit Button in Admin Page
- Beginner advice
- Change the ‘published on’ text?
- How to render a time-of-day string like ’16:42′ with a site’s chosen time format?
- How do I dynamically render an InnerBlock inside a dynamic block?
- ServerSideRender and Media Object: attributes passing image data object to php renderer even though it’s not set
- How to filter users list on user_status field with get_users()
- Gutenberg Block showing invalid content on edit
- How to use get_theme_mod in gutenberg editor wordpress?
- WordPress Block Development – trouble importing from @wordpress/icons
- Get Current Menu Location inside Nav_Walker
- Gutenberg blocks not getting styled on back end
- Is there an event or an other method that tells me the preview is loaded?
- SQL query for custom taxonomy slugs
- Tried in different ways but sidebar not working?
- Can Page Templates be Applied to Archive and Post Templates?
- Short code not working in boostrap modal dont no why?
- Is there a way to list all actions registered by a plugin or theme?
- WordPress Plugin with a shortcode that dynamically generates javascript. Can I use add_action without wrapping the javascript in a function?
- Howto: Use Custom Post Types as Submenu Items in Admin
- Is there some way to provide the user a list of existing content in a CPT
- Change the look and feel of admin pages
- Extending theme PHP class in plugin
- How to add Internationalization in WordPress using Javascript/React?
- Is there an additional block.json property to set to get an InnerBlocks child to respect the “supports” property?
- How to setAttributes in Gutenberg block?
- Run code once when block is created
- Best way to save custom css for an block