Closed willfaulds closed 8 years ago
This is already covered by the tests, see https://github.com/akeeba/fof/tree/development/Tests/Model/TreeModelDataprovider.php#L921-L921 especially the "Child node, first level" case. The method works correctly as you can see in the tests..
TreeModel->getParent()
I believe the scope of the initial SQL query is too narrow (my terminology is probably wrong) meaning it cannot find the root node as a parent.
My test data is: Title lft rgt root 1 6 cat1 2 5 cat2 3 4
->getParent() works fine on
root
&cat2
but oncat1
exits shows not Items with firstOrFailMy quick workaround solution