Try our conversational search powered by Generative AI!

New Block Creation doesn't get recognized for publish

Vote:
 

Hello all,

I have an IList<Block1> which has a content area property that accepts Blocks of same type Block1 .  When I try to Click on Create a New Block from Content Area option,  I get prompted this block option and select and click on Create Button. This creates the block in the For this Block space and page is stuck there. If I refresh I can see the block in the For this blocks area and can drag and drop and it works but I cannot figure out why the page freezes on clicking create button.

There is no different error in console and there is nothing in logs that would indicate what is going wrong. I am assuming some kind of dojo error but not sure where to start.

Note: I can create the same block type in a different content area under different block just normally. Not sure what's up with that one specific place. Any inputs will be appreciated. Thanks. Unfortunately I cannot provide screenshots

#318318
Mar 01, 2024 0:02
Vote:
 

Hi Dileep,

Just so I understand, You have a page with a property IList<CustomBlockWithContentArea>, then upon the content area of the 'CustomBlockWithContentArea' you have set allowedtypes to include the 'CustomBlockWithContentArea'. Does this sound correct?

If so I would say that while this does appear to create a problem, have you looked again at your structuring of blocks / architecture?

If you review some of the blog posts on world and general guidance is to avoid nested blocks.

Could you even switch out the IList<CustomBlockWithContentArea> to be a content area instead and restrict this to only allow 'CustomBlockWithContentArea'.

#318442
Mar 04, 2024 10:25
Vote:
 

From my experience IList<Block> properties are best used for flat data rather than hierarchial data, not just for the issues you're encountering, but also from an editor experience point of view.

I've encountered issues before with IList<Block> propertes where the block type contains a IList<> property where deleting from list on the block has actually deleted the block from the IList<Block> instead.  I do believe this particular issue has been fixed on later versions of CMS 12.  I also know that the Geta Categories property also does not play well with the IList<Block> property either.  I would recommend reconsidering the use of a ContentArea in this case as Paul has already suggested.

#318652
Edited, Mar 08, 2024 11:32
Vote:
 

Properties were designed to meet some client needs but I do agree that this structure leads to unnecessary complications. For now we have advised content creators to create the block first and drag in the respoective content area while we understand the root cause of the issue. Closing this topic for now.

#318857
Mar 12, 2024 16:06
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.