Unikka/login-as

Error on Fusion based backend modules

Opened this issue · 4 comments

Description

Before others wonder what this could be, I'll create a ticket prophylactically.

It can happen that a backend module throws the error that the LayoutRootpath is not defined. This happens with high probability because you have a module that uses Fusion instead of Fluid. I already stubled upon this while the development, but did not see an easy way to detect the view type of a module.

Only way right know is to limit the LayoutPath change for the Neos/Neos packages. Or just limit the change to the user management module.

Expected behavior

The Backend works with Fluid and Fusion based Modules

Actual behavior

Screenshot 2021-03-08 at 09 26 54

This happens for Fusion based modules.

Affected Versions

LoginAs: 2.0.0

This is a bit of a problem in one of my projects and breaks several modules.

Wouldn't it be simpler to just enable the feature for Neos/Neos modules?
If people want to have the feature in their own they have to adjust the views.yaml.

F.e. instead use

requestFilter: 'isPackage("Neos.Neos") && parentRequest.isController("Backend\Module") && isFormat("html") && !isPackage("Neos.Media.Browser") && !isController("Module\Management\History")'

The layoutRootPath is now limited to isPackage("Neos.Neos") but would be nice to detect the fusion views or just add assets to all neos modules. But for that we need to create a change in neos/neos itself.

With Neos 8.0 the package became part of the core and does not have the issue anymore.
But for the earlier versions, it still exists.