Ghost of the Dead Sitefinity MVC Widget Controller Haunts Me

We recently adopted Sitefinity and started building MVC widgets. All in all it works as advertised. Then after checking my new widget I realized that I called it wrong! Then I changed the name of my controller from MyWidgletController to MyWidgetController. After making the changes, I started getting a "Controller named" MySitefinityApp.Mvc.Controllers.MyWidgletController "could not be resolved exception. Scratch my head. Build ... again. One more problem. Recycle App-Pool. Same problem.

Here is the controller I'm working with (the names have been changed to protect the identity of the widgets):

[ControllerToolboxItem(Name = "MyWidget", Title = "My Widget", SectionName = "My Custom Widget Section")]
public class MyWidgetController : Controller
{
    public ActionResult Index()
    {
        return View("Default");
    }
}

      

Question: Why is Sitefinity still looking for MyWidgletController when it no longer exists?

+3


source to share


2 answers


It looks like Sitefinity is storing the controller name in their DB. If you are facing this problem, you can find your undead controller here:

select top 10 * from sf_control_properties where name = 'ControllerName'

      



Ugh. It's horrible. Sitefinity, you should be ashamed.

+4


source


LOL, I had the same situation when I created my own widget with mvc. another workaround is Goto -> / Sitefinity / Administration / Settings / Advanced



Then below ToolBoxes -> PageControls -> Sections you learn about your modules and then remove the required dead widgets

+2


source







All Articles