• Not Answered

Experience Editor pops up with 'An Error occurred'

Hi,

I'm facing this weird problem while adding a controller rendering to the page through Experience Editor. I've seen so many blogs on this issue. But, none of them worked for me. Any inputs will be highly appreciated.

I'm using Sitecore.NET 8.1 (rev. 151207)

Screenshot of popup

Error log

Nested Exception

Exception: Sitecore.Mvc.Diagnostics.ExceptionWrapper
Message: The controller for path '/' was not found or does not implement IController.
Source: System.Web.Mvc
at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
at Sitecore.Apps.TagInjection.DependencyResolver.TagInjectionControllerFactory.CreateController(RequestContext requestContext, String controllerName)
at Sitecore.Mvc.Controllers.SitecoreControllerFactory.CreateController(RequestContext requestContext, String controllerName)

3 Replies

  • Hi!

    Does this happen on all renderings? or specific ones?
    I would go ahead and check to ensure the rendering (controller type) has correct action and settings on the item itself, secondly may be the error handling is not done right on your controller method, what would happen when datasource is not set yet? Are you able and are confident that you are able to pick the correct datasource?
    From the looks of it, it is not able to find the correct controller. Ensure your code is built and items corresponding to controller are existing.
    To isolate the problem, try adding a view rendering by defining one and adding it to experience editor.
  • Looks like an issue with your dependency injection, either it is not initialized correctly or your controller rendering is not inheriting from correct base class.
  • In reply to Naveed Ahmad:

    I got same error on Sitecore 9.1. I found there is a mismatch Version of sitecore DLL in bin folder.