Problem with resolving correct view for Visitor Groups/Gadgets

Vote:
 

We inherited a solution from another partner that has a weird Edit-mode problem - Visitor Groups and Gadgets do not work as the Layout.cshtml file is resolved to the one that is used on the site itself, instead of the one that these modules should use. I've been through all the code and config for the site and even commented out most of it and replaced the config with config from Episervers Alloy site, but still no dice. 

I'm having a really hard time figuring out what could be the cause of this, so any suggestions would be greatly appreciated. 

#262032
Sep 10, 2021 10:53
Vote:
 

Check for _viewStart.cshtml files. They might have added one that sets the layout to a different one than the default. What dou you mean with 'Gadgets'? The "dasboard" where one can add differnt gadgets? Because a gadget/widget itself doesn't have a layout.

#262033
Sep 10, 2021 13:12
Vote:
 

Thanks for replying, Johan!

There is only one _viewStart.cshtml which refers the layout-file for the site. I do mean the dashboard gadgets which certainly seem to use a layout file (I replaced the contents of the site's layout file with a simple <h1> to demonstrate the problem:

So it seems that something is interfering with Episerver's ability to determine the correct layout file, but I can't figure out what. 

#262035
Edited, Sep 10, 2021 13:58
Vote:
 

Ah, forgot that you can do MVC gadgets. Have you search the whole code base for e.g. the property 'Layout'? Might be some code piece that changes this property.

#262036
Sep 10, 2021 14:03
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.