Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jul 22, 2015 @ 12:57
    Jeroen Breuer
    1

    DocTypeGridEditorSurfaceController error

    Hello,

    I'm trying to use the DocTypeGridEditorSurfaceController. I've got the following code:

    public class GridLatestNewsSurfaceController : DocTypeGridEditorSurfaceController
    {
        public ActionResult GridLatestNews()
        {
            // Do your thing...
            return CurrentPartialView();
        }
    }
    

    If I comment this class there are no errors. When the class is active I get the following exception:

    System.Web.HttpException (0x80004005): Execution of the child request failed. Please examine the InnerException for more information. ---> System.Web.HttpException (0x80004005): The controller for path '/' was not found or does not implement IController.
       at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
       at Umbraco.Web.Mvc.RenderControllerFactory.CreateController(RequestContext requestContext, String controllerName)
       at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
       at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
       at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func)
       at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func)
       at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
       at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage)
       at System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm)
       at System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter)
       at System.Web.Mvc.Html.ChildActionExtensions.Action(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues)
       at Our.Umbraco.DocTypeGridEditor.Web.Extensions.HtmlHelperExtensions.RenderDocTypeGridEditorItem(HtmlHelper helper, IPublishedContent content, String viewPath, String actionName, Object model)
       at ASP._Page_app_plugins_doctypegrideditor_render_doctypegrideditor_cshtml.Execute() in c:\SVN\umbraco-framework\trunk\Hybrid Framework - Best Practises\development\Umbraco.Site\App_Plugins\DocTypeGridEditor\Render\DocTypeGridEditor.cshtml:line 14
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
       at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
       at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
       at ASP._Page_Views_Partials_grid_editors_base_cshtml.Execute() in c:\SVN\umbraco-framework\trunk\Hybrid Framework - Best Practises\development\Umbraco.Site\Views\Partials\Grid\Editors\Base.cshtml:line 20
    

    Anyone had this before?

    Jeroen

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jul 22, 2015 @ 13:59
    Matt Brailsford
    0

    Your controller looks correct (assuming your doctype's alias is GridLatestNews).

    Unfortunately there isn't much to go on in that exception, it just seems not to be able to find the controller for some reason. Best I could suggest is check your naming, and debug in to see what it's trying to resolver as a controller and make sure it's correct.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jul 22, 2015 @ 14:09
    Jeroen Breuer
    0

    Hi Matt,

    I checked the naming serval times. If I rename the class or ActionResult to GridLatestNews2 I don't get the error. So only if the name is correct I get the error. When I debug the ActionResult never gets hit so the error seems to happen before that.

    Jeroen

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jul 22, 2015 @ 14:58
    Jeroen Breuer
    0

    Hi Matt,

    I tried an exact copy of the example in the documentation. Did everything with the TestDocType and still getting the same error.

    Do you have a working example on 0.1.1?

    Jeroen

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jul 23, 2015 @ 09:55
    Jeroen Breuer
    0

    Been doing some more research. In the source of the Doc Type Grid Editor the error happens here:

    https://github.com/leekelleher/umbraco-doc-type-grid-editor/blob/develop/Src/Our.Umbraco.DocTypeGridEditor/Web/Extensions/HtmlHelperExtensions.cs#L33

    return helper.Action(actionName, controllerName, new
    

    These are the values:

    actionName -> GridLatestNews

    controllerName -> GridLatestNewsSurface

    And that still throws this exception:

    The controller for path '/' was not found or does not implement IController.
    

    Still don't know what's wrong exactly.

    Jeroen

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jul 23, 2015 @ 10:52
    Jeroen Breuer
    100

    I solved the issue by this post:

    https://our.umbraco.org/forum/getting-started/installing-umbraco/43708-The-controller-for-path-was-not-found-or-does-not-implement-IController-error-after-upgrade-from-v605-to-v613-#comment-190758

    So after adding a namespace it worked :-). Next time I'll write some experimental code I'll add that first thing ;-).

Please Sign in or register to post replies

Write your reply to:

Draft