New DB Record When Editing Block?

Permalink
I noticed that when a block is edited, an entirely new record for that block type is created in the DB as opposed to updating the existing record. Assuming that's the intended behavior, I'm wondering why that is.

Thanks for any insights,

-Steve

Shotster
 
mose replied on at Permalink Reply
mose
A page has versions.
Shotster replied on at Permalink Best Answer Reply
Shotster
Thanks, mose. I wasn't quite grasping how blocks worked with page versions. It turns out my original observation was not entirely correct. A new block record is not created whenever a block is edited - only when edited for the first time in a new page version ( a page version being defined by a "page editing session" which appears to end when you either exit edit mode or sign out).

So for example, after putting a page in edit mode, the first time you edit a block, a new record for that block is created in the DB. Subsequent edits to that block, as long as you haven't logged out or left edit mode, just modify that record. However, if you exit edit mode - even if it's just to "preview" the page - that editing session is over, which means a new version will be created the next time that page is edited. So basically, previewing a page actually creates a new version of it.

Anyway, I think I have a better handle on how versions work now.

-Steve