Which jcdcdev.Umbraco.ReadingTime version are you using?
13.0.10
Which Umbraco version are you using? For example: 10.4.0 - don't just write v10
13.14.0
Bug summary
Currently the package hooks into 2 relevant notifications (ContentSaving and ContentDeleting)
However, when a site or a whole section of a site is deleted/moved to the recycle bin and fully erased from the bin as well, this does not seem to trigger individual ContentSaving or ContentDeleting notifications per node in the empty operation, it raises a global set of just ContentMovingToRecycleBin + EmptyingRecycleBin (relevant ones).
This then is not caught by the package and leads to a foreign key constraint violation when Umbraco attempts to delete the whole contents of the bin.
As far as I can see the current delete process for the contentsaving notification simply deletes the data from the DB and does nothing else, so I'm not sure if possibly, simply changing the nature of the constraint to CASCADE deleting in the readingtime table when the the values from the umbraco tables are deleted?
I do seem to see that in v14 and v17 the table seems to be deleted so it might conflict with the upgrade path, and if so I'd suggest an alternative
We'd watch for either of those 2 notifications (whichever might be best) and update/delete reading time entries accordingly in the respective tree of content (contentmovingtorecylebin might be the best one, but up for debate)
Thoughts?
Steps to reproduce
- Have a content tree with say 5-10 nodes
- Delete the whole content tree or part of it
- Select "empty recycle bin" and verify the constrain error (MSSQL in my example's case, but might fail on SQLite too)
Expected result / actual result
Expected: all nodes are cleared from the recycle bin without issue
Actual: prevented from emptying recycle bin due to FK contraints
Which jcdcdev.Umbraco.ReadingTime version are you using?
13.0.10
Which Umbraco version are you using? For example: 10.4.0 - don't just write v10
13.14.0
Bug summary
Currently the package hooks into 2 relevant notifications (ContentSaving and ContentDeleting)
However, when a site or a whole section of a site is deleted/moved to the recycle bin and fully erased from the bin as well, this does not seem to trigger individual ContentSaving or ContentDeleting notifications per node in the empty operation, it raises a global set of just ContentMovingToRecycleBin + EmptyingRecycleBin (relevant ones).
This then is not caught by the package and leads to a foreign key constraint violation when Umbraco attempts to delete the whole contents of the bin.
As far as I can see the current delete process for the contentsaving notification simply deletes the data from the DB and does nothing else, so I'm not sure if possibly, simply changing the nature of the constraint to CASCADE deleting in the readingtime table when the the values from the umbraco tables are deleted?
We'd watch for either of those 2 notifications (whichever might be best) and update/delete reading time entries accordingly in the respective tree of content (contentmovingtorecylebin might be the best one, but up for debate)
Thoughts?
Steps to reproduce
Expected result / actual result
Expected: all nodes are cleared from the recycle bin without issue
Actual: prevented from emptying recycle bin due to FK contraints