was not found or does not implement IController for Plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 7 ans
Hi Every Body
I Create My plugin with following specifications:

public partial class RouteProvider : IRouteProvider
    {
         public void RegisterRoutes(RouteCollection routes)
         {
             routes.MapRoute("Plugin.Stuff.ChangePrice.List",
                  "admin/Plugins/ChangePrice/List",
                  new { controller = "ChangePrice", action = "List", },
                  new[] { "Nop.Plugin.Stuff.ChangePrice.Controllers" }
             );

             routes.MapRoute("Plugin.Stuff.ChangePrice.Edit",
                  "admin/Plugins/ChangePrice/Edit",
                  new { controller = "ChangePrice", action = "Edit" },
                  new[] { "Nop.Plugin.Stuff.ChangePrice.Controllers" }
             );
         }
  
        public int Priority
        {
            get
            {
                return 1;
            }
        }
    }



public class ManagePrice:BasePlugin, IAdminMenuPlugin
    {
        public void ManageSiteMap(SiteMapNode rootNode)
        {
            var menuItem = new SiteMapNode()
            {
                SystemName = "Stuff.ChangePrice",
                Title = "ChangePriceByCategory",
                ControllerName = "ChangePrice",
                ActionName = "List",
                Visible = true,
                RouteValues = new RouteValueDictionary() { { "Area", "Admin" } },
            };
            var pluginNode = rootNode.ChildNodes.FirstOrDefault(x => x.SystemName == "Third party plugins");
            if (pluginNode != null)
                pluginNode.ChildNodes.Add(menuItem);
            else
                rootNode.ChildNodes.Add(menuItem);
        }
        public override void Install()
        {
            base.Install();
        }

        public override void Uninstall()
        {
            base.Uninstall();
        }
    }

the controller only show very simple page .When i click on link of site  it redirects to page not found and in log table create a record that says  System.Web.HttpException (0x80004005): The controller for path '/admin/Plugins/ChangePrice/List' was not found or does not implement IController.
I couldn't found why it couldn't recognize controller.

Thanks for any guides.
Ali
Il y a 7 ans
Hi Every Body
The Problem Resolved.The Controller was not public.

Regards
Ali
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.