RequestLostPassword.cshtml in my Theme

Topics: Writing themes
Jan 9, 2013 at 10:27 PM

I seem to be having a problem overriding the default RequestLostPassword view in my theme.

I've tried the following locations to no avail:

/Themes/MyTheme/Views/RequestLostPassword.cshtml

/Themes/MyTheme/Views/Account/RequestLostPassword.cshtml

/Themes/MyTheme/Views/Orchard.Users/RequestLostPassword.cshtml

/Themes/MyTheme/Views/Orchard.Users/Account/RequestLostPassword.cshtml

I still get the default View.

Is this View no longer able to be overridden? Thanks!

Developer
Jan 9, 2013 at 10:40 PM

The last version should work: /Themes/MyTheme/Views/Orchard.Users/Account/RequestLostPassword.cshtml

I have it working here, so I'm not sure why it isn't working on your end. I'm sure you've checked for path, typos and that your theme is enabled?

Jan 9, 2013 at 10:54 PM

Interesting...after reading a couple other discussions, I had settled on /Themes/MyTheme/Views/Orchard.Users/Account/RequestLostPassword.cshtml being the correct method, but couldn't get it to work. So...I cleared my browser cache, did a CTRL-F5 to hard reset...still came up with the default.

Got busy for a bit and came back to the page after about 15 minutes...did a refresh and now it's displaying.

I'm thinking somewhere along the line, someone is doing some caching. I don't have any caching modules installed, so I'm not sure where it is.

Thanks for the conformation on the method though.

Developer
Jan 9, 2013 at 11:06 PM

No problem. Perhaps it's the ASP.NET cache, I don't know. What you could try next time is recycling the application pool (saving web.config will have that effect).

Jan 9, 2013 at 11:08 PM

Good idea...I'll try that next time. Arvixe makes recycling the app pool fairly quick and easy. Thanks!