Intermittent waves of annoying exceptions when debugging Admin features under VS2012

Topics: Customizing Orchard, Troubleshooting
Mar 7, 2013 at 8:11 AM
Edited Mar 7, 2013 at 12:57 PM
Sometimes my debuging on Orchard get interrupted by this kind of exception when I am accessing the Admin side of Orchard, I can't find the reason why and would welcome any solution:

The controller for path '/OrchardLocal/Themes/TheAdmin/styles/menu.themes-admin.css' was not found or does not implement IController.

Necessitate dozen of clicks to continue.
I think this exception exists when non debuging but catched and not traced.
Always this folder.
the css file could change and should not exist in this folder, the web.config is correctly installed here, and why searching for a controller for css content ?

Bug of VS2012 ?

It occurs in ShellRoute.cs, method:
 class HttpAsyncHandler : HttpHandler, IHttpAsyncHandler {
            private readonly IHttpAsyncHandler _httpAsyncHandler;
            private IDisposable _scope;

            public HttpAsyncHandler(IWorkContextAccessor containerProvider, IHttpAsyncHandler httpAsyncHandler)
                : base(containerProvider, httpAsyncHandler) {
                _httpAsyncHandler = httpAsyncHandler;
            }

            public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData) {
                _scope = _workContextAccessor.CreateWorkContextScope(new HttpContextWrapper(context));
                try {
                    return _httpAsyncHandler.BeginProcessRequest(context, cb, extraData);
                }
                catch {
                    _scope.Dispose();
                    throw;
                }
            }

            [DebuggerStepThrough]
            public void EndProcessRequest(IAsyncResult result) {
                try {
                    _httpAsyncHandler.EndProcessRequest(result);
                }
                finally {
                    _scope.Dispose();
                }
            }
        }
Apr 3, 2013 at 10:24 PM
Edited Apr 3, 2013 at 10:26 PM
Missing documentation/understanding in a copied code...when you add your own Admin menu using
public void GetNavigation(NavigationBuilder builder) {
        builder
            .AddImageSet("my-image")
            .Add(item => item
                .Caption(T("myCaption"))
                .Position("3")
                .LinkToFirstChild(true)
you must create a css with name 'menu.mycaption-admin.css
inside define the styles navicon-my-image and subnavicon-xxxx if you have sub menu item on level 2
Developer
Apr 4, 2013 at 11:06 PM
This is a known issue with the resource manager occasionally messing up resources. It's supposed to be fixed in the latest source.
Apr 4, 2013 at 11:30 PM
I am using latest code ?
Developer
Apr 5, 2013 at 10:27 AM
Then please open a new bug report about this.
Jul 8, 2013 at 7:27 AM
I get the same issue:

The controller for path '/OrchardLocal/Themes/TheAdmin/styles/menu.widgets-admin.css' was not found or does not implement IController.

I did notice that the CSS files are not in the "Themes/TheAdmin/styles/" folder, so indeed menu.widget-admin.css was not found as the error message states.

Where can I download these files (apparently, there are several missing from the source code for version 1.6)?
Coordinator
Jul 8, 2013 at 7:54 AM
It should not be looking for those files there. That's not where they are supposed to be. Can you try with the latest source code in 1.x?
Jul 8, 2013 at 8:03 AM
From what I remember It is not related to the files mentioned in the message, the error is 'incorrectly broadcasted' due to several small error layers.
Jul 8, 2013 at 7:04 PM
BertrandLeRoy wrote:
It should not be looking for those files there. That's not where they are supposed to be. Can you try with the latest source code in 1.x?
I'm using the latest sourcecode version (Orchard v.1.6.1.0) from CodePlex.
Coordinator
Jul 8, 2013 at 7:07 PM
The bug has probably been fixed already. Bertrand was mentioning the source code for the currently worked on version, in the source tab on codeplex.
Coordinator
Jul 8, 2013 at 9:01 PM
Edited Jul 8, 2013 at 9:03 PM
And we get our only non-5-star review for 1.6 because of this? ;) Boohoo.

Seriously, does anyone have a repro with the latest 1.x? The latest source code version is not what we're referring to: the one you have is 1.6.1, which is pretty much 10-month-old code.
Jul 8, 2013 at 11:07 PM
Edited Jul 8, 2013 at 11:07 PM
What is the latest beta version? I saw 1.7 and 2.0, but no download link. :(
Coordinator
Jul 8, 2013 at 11:17 PM
Jul 8, 2013 at 11:43 PM
I decided to completely delete my old version and start over from scratch again.

This is the correct file, right?
orchard-f65d032a9b0c.zip
Developer
Jul 8, 2013 at 11:47 PM
Edited Jul 8, 2013 at 11:47 PM
No, the 1.x tip is here... http://orchard.codeplex.com/SourceControl/latest then click on the download link on the right hand side next to fork and clone.

As of 3 hours ago its 4d96ee6e53f1
Coordinator
Jul 8, 2013 at 11:55 PM
Or install TortoiseHg and clone the repository to be always up to date...
Jul 9, 2013 at 12:11 AM
ok - so I select browsing changed 1.x from the dropdown first - I got it now (didn't even notice the dropdown)!
THANKS!
Jul 9, 2013 at 12:38 AM
Started from scratch (blew away the database and started with fresh folder) and getting the error now - the first link I clicked (after going to the admin dashboard) was "Content" and got the following error:
The controller for path '/OrchardLocal/Themes/TheAdmin/styles/menu.users-admin.css' was not found or does not implement IController.
on ShellRoute.cs page.

I'm running on Windows 8 SP1
Visual Studio 2012 11.0.60610.01 Update 3

I cleaned the solution and re-built it before I ran the program. No customizations or changes were made.
Coordinator
Jul 9, 2013 at 12:47 AM
Can you copy-paste the full HTML of this page and share it with us ?

Thanks
Coordinator
Jul 9, 2013 at 12:48 AM
Also, it seems you are running in Debug mode to see an exception like this, simply hit CTRL+F5 and it will be faster and won't be bothered by exceptions when a 404 is hit. Which doesn't prevent us from finding the reason why you hit a 404.
Jul 9, 2013 at 2:13 AM
I shut down Visual Studio and re-started the app. No errors now - I can't reproduce it. I think this may be a VS issue.
Coordinator
Jul 9, 2013 at 2:36 AM
I've noticed an issue on the latest VS+web tools where the first build after a pull from the repo fails. Re-building fixes it.