Kunstmaan / KunstmaanBundlesCMS

An advanced yet user-friendly content management system, based on the full stack Symfony framework combined with a whole host of community bundles. It provides a full featured, multi-language CMS system with an innovative page and form assembling process, versioning, workflow, translation and media managers and much more.
https://kunstmaancms.be
MIT License
406 stars 188 forks source link

[NodeBundle] Duplicate pages in admin menu #3476

Open dannyvw opened 11 hours ago

dannyvw commented 11 hours ago

We have a "multi_lang" configuration with multiple locales (nl/en/de). If the page is not translated then it will show the page multiple times in the admin menu. This method https://github.com/Kunstmaan/KunstmaanBundlesCMS/blob/7.x/src/Kunstmaan/NodeBundle/Repository/NodeRepository.php#L262 returns the same node multiple times.

It can also be solved to use $this->treeNodes[$parent_id][$nodeInfo['id']] = $nodeInfo; on this line https://github.com/Kunstmaan/KunstmaanBundlesCMS/blob/7.x/src/Kunstmaan/NodeBundle/Helper/Menu/PageMenuAdaptor.php#L154

Image