Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Show in tree is not working #789

Closed
atul-emico opened this issue Dec 11, 2024 · 1 comment · Fixed by #783
Closed

[BUG] Show in tree is not working #789

atul-emico opened this issue Dec 11, 2024 · 1 comment · Fixed by #783
Milestone

Comments

@atul-emico
Copy link

On object edit page "Show in tree" is not working. In network tab Ajax request is successful, but process tree is not working.

Image

In further investigation it is found that "processTree" function in "vendor/pimcore/admin-ui-classic-bundle/public/js/pimcore/treenodelocator.js" file is having a issue.

var locateConfig = globalState.locateConfigs[globalState.currentTreeIndex];
var tree = locateConfig.tree;
var rootNode = tree.tree.getRootNode();
var rootNodeId = rootNode.getId();

// Tree root may be shifted to a subnode and the item to be shown
// is out of tree scope - don't continue if this is the case:
if (globalState.pathIds.indexOf(rootNodeId) == -1) {
    self.reportProcessTreeFailed();
    return;
}

In latest version 1.7.2 "rootNodeId" is of type number. Earlier it was of type "string". Because of this change
if (globalState.pathIds.indexOf(rootNodeId) == -1) condition is always true. So next code is not getting executed.

For testing purpose I tried to make a root node id as string and it is working fine.

var rootNodeId = rootNode.getId().toString();

@blankse
Copy link
Contributor

blankse commented Dec 13, 2024

Already fixed by #783

@fashxp fashxp added this to the 1.6.5 milestone Dec 17, 2024
@fashxp fashxp linked a pull request Dec 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants