Try our conversational search powered by Generative AI!

Remove block stuck in limbo

Vote:
 

So here is the problem.

I have a block type I want to remove because it is obsolete. I can't do this because there is still once instance of that type in the cms.

That block however is/was located in the "for this block" folder of another block that has already been removed (I checked a backup to confirm this).

Since I can't find the block in the content structure anywhere I am having a really hard time removing it.

I can access it from the warning list when I try to remove the block type but that dosent help me much because I can't find a way to remove the block from there.

If anyone have any suggestions I would be most grateful.

#112867
Nov 06, 2014 15:03
Vote:
 

Maybe the block with the "for this block" folder is in the thrash? Have you tried emptied it?

Also, if you can access it, you should see the ID in the url. A dirty fix would be to call Delete on that ID directly:

var contentRepository = ServiceLocator.Current.GetInstance<IContentRepository>();
            contentRepository.Delete(new ContentReference(123),true);



#112868
Nov 06, 2014 15:14
Vote:
 

Thanks of the reply.

The containing block has already been removed from the thrash. I thought that any blocks in "for this block" folder would be removed as well but I guess that is not the case.

Yes I can get the block ID since I can access it in edit mode via admin mode remove block type. I suppose that might be ok this time but it would be a really good to be able to remove a block in some other way.

#112894
Nov 07, 2014 8:49
Vote:
 

There is a scehduled job "Remove UNrelated Content Assets" that will remove all unused content asset folders ("for this page/block") and everything ther in.

#112896
Edited, Nov 07, 2014 9:13
Vote:
 

I was not aware of that. You learn something new every day! :-) My dirty fix should be ignored then

#112897
Edited, Nov 07, 2014 9:35
Vote:
 

That worked like a charm. Thanks Johan.

#112898
Nov 07, 2014 9:48
Vote:
 

Just letting you guys know that "Remove Unrelated Content Assets" did not work for me. I had a few blocks that I removed from code, and because I had refactored content types that used to contain content areas which accepted the removed type, some of the blocks are stuck in limbo. It is unacceptable to be required to remove content by their ID's. What really needs to exist, is a 'remove this block' when you're in block edit view.

#178085
Apr 29, 2017 16:32
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.