Deleting a block does not remove record from db table.
Permalink
I created a simple block type that uses three fields in the block table. I loaded several blocks onto a page and after testing my work for any problems, I deleted these block.
When deleting them from a page it did not remove their records from the block table. I thought that Concrete5 was supposed to do this as a matter of automatic housekeeping.
Anyone have any idea of why this isn't happening?
When deleting them from a page it did not remove their records from the block table. I thought that Concrete5 was supposed to do this as a matter of automatic housekeeping.
Anyone have any idea of why this isn't happening?
If you move your page back a version, you want the block to be there, correct?
I have to think about the implications of that but not in this instance.
Page and block versioning are fundamental features of C5's architecture. Why do you need to defeat it?
OK, I get it. Concrete5 creates a new record for each block in each page version created and not just each block created.Somehow I must have published the page while working with this block type. That's why I am getting more than one record while I am testing my work. Am I correct to assume that the way to get rid of the unneeded records is to delete any page versions that have this block type on it?
Yes, the block record is deleted for the block version that was on the deleted page version. Is there a functional reason that you need to rid the table of all previous block versions or are you just concerned about database bloat?
Not really. It's just good housekeeping procedure to remove any information when it no longer serves any purpose and it can add to the confusion trying to discern what data is relevant while working and testing.