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
- 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?
- 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
- Why does WordPress use outdated jQuery v1.12.4?
- Is it possible to reuse wp.media.editor Modal for dialogs other than media
- Check for featured image in WP_Query
- How to remove unwanted panels inside InspectorControls from core blocks in Gutenberg
- Get file headers in custom file
- What is the difference between these two methods of writing $ instead of jQuery in WordPress [closed]
- Can’t get JS code to work with shortcode
- Using the component outside the editor. select(‘core’) is null
- Gutenberg is there a way to know if the current block is reusable?
- How do I add a javascript file to all admin pages via a plugin?
- Is there any way to have Featured Text, as opposed to Featured Image?
- Find source of notice / warning / errors efficiently
- StackExchange clone using WordPress?
- Sharing common functionality (functions, template parts) between plugins and themes?
- Gutenberg Block showing invalid content on edit
- Short code not working in boostrap modal dont no why?
- Elementor custom Query with ACF fields to show matching woocommerce products custom fields
- PowerPress mobile media player
- When is the proper time to minify css and js with git workflow?
- add javascript files only when plugin is called?
- Gutenberg table block with Bootstrap .table class
- Can’t change the style of a submit input type? [closed]
- Custom entity search and display
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- How to properly package a block plugin
- Setting a post’s category
- Query String Filtering API
- Gutenberg block breaks when showing new data
- Metabox types list
- Gutenberg component in a plugin admin
- Append php file to footer
- Filterable posts using categories
- How do I make two shortcode use the same id and increment it when I use them multiple times?
- How to CRUD from wordpress database in wordpress theme?
- Caption Shortcode: what filter to change the image size?
- Issue on Getting WP Gallery Items In cpt-single.php As Attachments
- WordPress Beginer to Guru [duplicate]
- REST API error in block editor for custom templates
- Set srcset on a block image
- How to add group-row to InnerBlock template?
- Insert Button in to the Block Editor (Header) Toolbar
- How to include block style variations for blocks in posts dynamically rendered via the Interactivity API