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

"Show in tree" results in JS request loop (in combination with perspectives/views) #3554

Open
gadget60 opened this Issue Oct 31, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@gadget60

gadget60 commented Oct 31, 2018

This is propably related to #3520 but I have some other strange things happening.

Actually I did some testing with the "Show tree node" because this function did not work in a scenario with multiple object views (e.g. /products, /categories, ...) - just objects of the first tree were resolved. However I run into a much more severe bug - here's the boiled-down test setup.

Steps to reproduce

Just set up a clean 5.5.3 install and did following:

  • Created a class "Test" with a single property "name".
  • In "Objects", created two root folders "tree1" and "tree2.
  • Created in objects "/tree2" a bunch of folders (just enought in order to have tree paging)
  • Created an object of class "Test" in the last folder (on page 2) - not sure if this matters though

Set up following /app/config/pimcore/customviews.php:

<?php

return [
    'views' => [
        [
            'treetype' => 'object',
            'name' => 'view 1',
            'condition' => null,
            'id' => 1,
            'rootfolder' => '/tree1',
            'showroot' => false
        ],
        [
            'treetype' => 'object',
            'name' => 'view 2',
            'condition' => null,
            'id' => 2,
            'rootfolder' => '/tree2',
            'showroot' => false
        ]
    ]
];

...and /app/config/pimcore/perspectives.php:

<?php

return [
    'default' => [
        'iconCls' => 'pimcore_icon_perspective',
        'elementTree' => [
            [
                'type' => 'documents',
                'position' => 'left',
                'expanded' => false,
                'hidden' => false,
                'sort' => -3
            ],
            [
                'type' => 'assets',
                'position' => 'left',
                'expanded' => false,
                'hidden' => false,
                'sort' => -2
            ],
            [
                'type' => 'objects',
                'position' => 'left',
                'expanded' => false,
                'hidden' => false,
                'sort' => -1
            ]
        ]
    ],
    'custom view' => [
        'elementTree' => [
            [
                'type' => 'customview',
                'id' => 1,
                'position' => 'left'
            ],
            [
                'type' => 'customview',
                'id' => 2,
                'position' => 'right'
            ]
        ]
    ]
];
  • Reloaded page and switched to perspecitve "custom view"
  • Opened the "Test" object
  • Navigated back to page 1 in tree pager "view 2"

It should look like this now...
image

Click on "Show in tree" in the "Test" object

I end up in a never ending loop requesting tree-get-childs-by-id:
image

@gadget60

This comment has been minimized.

gadget60 commented Oct 31, 2018

Update: The whole object creation part isn't even necessary: Just tested this by using folders only and the error is reproducable in version 5.5.3.

@gadget60 gadget60 changed the title from "Show tree node" results in JS request loop (in combination with perspectives/views) to "Show in tree" results in JS request loop (in combination with perspectives/views) Oct 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment