Hi,
I’ve just been wondering about deleting documents and the associated Jot comments. Will the comments associated with a document be deleted if the document is deleted?
I’ve just tested this, and no, the comments aren’t removed. So, if a document is deleted, the comments will continue to bloat the database. This could be solved with a plugin, surely?
Thanks,
Luke.
-
MODX Staff
- 12,272 Posts
Perhaps there should be a OnEmptyTrash event ...
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
onEmptyTrash seems like a great idea.
OnBeforeEmptyTrash and OnEmptyTrash events added to internal development branch in revision 2574. $modx->event->params[’ids’] will hold an array of document id’s to be removed or what have been removed.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
That is quick, efficient and really really lovely.
just like the rest of MODx.
Thanks Doze!
-
MODX Staff
- 12,272 Posts
Those are now in 096 RC3. Now a plugin would have to be written to specifically look for those comments.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me