pimcore / perspective-editor

Perspective Editor community bundle provides a management UI for Pimcore perspectives.
https://pimcore.com/docs/platform/Perspective_Editor/
Other
20 stars 11 forks source link

[Bug]: Not possible to add classes #55

Closed dpfahlbusch closed 2 years ago

dpfahlbusch commented 3 years ago

Expected behavior

Not possible to add classes in perspectives editor

Actual behavior

Like mentioned here: https://github.com/pimcore/pimcore/discussions/10463

its currently not possible to add classes via perspectives editor, so we can not create a working perspective

Steps to reproduce

roland4432 commented 3 years ago

Hi @dpfahlbusch, could you maybe share a config with configured classes? I am currently not exactly sure which part of the config you are thinking of. Thank you.

dpfahlbusch commented 3 years ago

Hi @roland4432 here is an example: https://github.com/pimcore/skeleton/blob/10.x/config/pimcore/customviews.example.php#L12

roland4432 commented 3 years ago

I checked the part of the config. I can insert this in the config, but I have to point out, that this is not affecting ACL concerns, and since users can switch their perspective, it won't prevent users from creating other classes as stated in a particular perspective.

This is a permission issue and should be at least also been setup in the user / role classes permission.

MagPim commented 3 years ago

I also have the problem, at least I suppose this is the same problem. When I try to add a custom view in my perspective, this custom view (Product object in specific directory), I get an error when I then switch to this perspective. I get this message: image I was never asked in the view creation which class I want in the view creation. Would that be the problem?

MagPim commented 3 years ago

Following my last comment: if I add the line "classes: PRDT.." in my view yaml, then I don't have the error and I can see what I need to see.

langert commented 2 years ago

As the config file is in yaml now - can anyone give an example of the correct notation for a selection of object classes in yaml ?

MagPim commented 2 years ago

Here is what I added to make it work: image

langert commented 2 years ago

guessing the key is the unique class identifier and null the depth to show?

classes: 6: null 2: null

seems to work to limit the shown objects. But my expectation, that the other folders, not having any objects of the named classes will disapear did not happen ;-) Is it possible to name some rootfolders to be shown and hide all others?