Fixed \XF\Behavior\TreeStructured::deleteChildren method not deleting the nested children

AddonsLab

Well-known member
Affected version
2.0.x, 2.1.x
Hello,

While working with an add-on that is using the standard tree structure to represent a category tree, we tested the deletion of categories with deleteChildAction option being set to delete and noticed, that if the children of the category being deleted have some child categories on their own, these grand-children (and their children) remain in the database, with no possibility to access them later. I assume also the items associated with them would remain in the database, but did not test that case specifically.

The solution seems to be setting deleteChildAction option of XF:TreeStructured behavior for the child categories based on the option from the current behavior.

Thank you!
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.4).

Change log:
Ensure deleteChildAction option of XF:TreeStructured behaviour is passed through to child entities
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top Bottom