Unikka / login-as

Plugin for the Neos CMS that enables users to login with other accounts for support reasons e.g.
GNU General Public License v3.0
13 stars 4 forks source link

Error on Fusion based backend modules #9

Open markusguenther opened 3 years ago

markusguenther commented 3 years ago

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

Sebobo commented 3 years ago

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.

Sebobo commented 3 years ago

F.e. instead use

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

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.

markusguenther commented 2 years ago

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.