I'm trying to manage a nested list with scopes in AdminGeneratorGenerator (it seems that the existing code does not manage scopes, so I've inherit some core functions).
I've successfully displayed a nested list with 4 scopes and create a new object with right "scope", "left", "right" and "level" value. If I move this object on the tree, it works nice, everything is updated as expected.
I've moved my new element to be the first child of the first displayed node (id="node-2").
If i reload the page, this node has got the "expand" icon: if I click on it, it expands but the child is displaying at the end of the tree, as if it was a child of the last node.
here is the generated html of the "child of node-2":
public function preSave(\Symfony\Component\Form\Form $form, \Arex\Model\ContentGeneric $ContentGeneric)
{
// get current scope root node
$rootScope = ContentGenericQuery::create()->treeRoots()->inTree($ContentGeneric->getContentCategoryId())->findOne();
if (!$rootScope) {
throw new \Exception('Root node of scope not found.');
}
$ContentGeneric->insertAsLastChildOf($rootScope);
}
Env = SF2.3 / Propel 1.6 / AdminGeneratorGenerator 1.0.0 / FireFox 30
I'm trying to manage a nested list with scopes in AdminGeneratorGenerator (it seems that the existing code does not manage scopes, so I've inherit some core functions).
I've successfully displayed a nested list with 4 scopes and create a new object with right "scope", "left", "right" and "level" value. If I move this object on the tree, it works nice, everything is updated as expected.
I've moved my new element to be the first child of the first displayed node (id="node-2"). If i reload the page, this node has got the "expand" icon: if I click on it, it expands but the child is displaying at the end of the tree, as if it was a child of the last node.
here is the generated html of the "child of node-2":
It seems to be only a display problem because all datas are ok, but i put here some configs if it could help to explain this bug.
generator.yml
ListController:
NewController: