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.
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.
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.
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.