Home Page down after uninstall and removal of all files from SEO Checker package
Hi folks,
I have an issue I need some help with please.
I had installed the SEO Checker Package
not realising it's only for commercial use so I uninstalled it which caused the whole site to break down. After removing all the SEO Checker package files all landing pages are back up but the home page is still down when using the domain URL.
It shows the following:
Unable to cast object of type 'Umbraco.Web.PublishedContentModels.ContentPage' to type 'Umbraco.Web.PublishedContentModels.Home'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Unable to cast object of type 'Umbraco.Web.PublishedContentModels.ContentPage' to type 'Umbraco.Web.PublishedContentModels.Home'.
// Get basic design settings from the homepage
var home = (Home)Model.Content.Site();
var colorTheme = Umbraco.GetPreValueAsString(home.ColorTheme);
var font = Umbraco.GetPreValueAsString(home.Font);
My issue is that I am not a developer and I don't have much experience with Umbraco or Razor so it's sometimes a bit too tricky for me to figure out what is going wrong.
Do you have some internal redirects in the project or something like that?
In any case, you can maybe just do not use strongly typed models. So get values like that:
var home = Model.Content.Site();
var colorTheme = Umbraco.GetPreValueAsString(home.GetPropertyValue<int>("colorTheme"));
var font = Umbraco.GetPreValueAsString(home.GetPropertyValue<int>("font"));
Think SEOChecker is still in your model and it fails because of that. Sorry to hear you needed to uninstall. Sometimes the Umbracolog comes with a more detailed error description.
Home Page down after uninstall and removal of all files from SEO Checker package
Hi folks,
I have an issue I need some help with please.
I had installed the SEO Checker Package not realising it's only for commercial use so I uninstalled it which caused the whole site to break down. After removing all the SEO Checker package files all landing pages are back up but the home page is still down when using the domain URL.
It shows the following:
Unable to cast object of type 'Umbraco.Web.PublishedContentModels.ContentPage' to type 'Umbraco.Web.PublishedContentModels.Home'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Unable to cast object of type 'Umbraco.Web.PublishedContentModels.ContentPage' to type 'Umbraco.Web.PublishedContentModels.Home'.
Source Error:
Source File: C:\WebOnlyServer\kunterbunteschaos_de\web\Views\Master.cshtml Line: 6
Stack Trace:
[InvalidCastException: Unable to cast object of type 'Umbraco.Web.PublishedContentModels.ContentPage' to type 'Umbraco.Web.PublishedContentModels.Home'.] ASP.PageViewsMastercshtml.Execute() in C:\WebOnlyServer\kunterbunteschaos_de\web\Views\Master.cshtml:6 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122 System.Web.WebPages.<>cDisplayClass3.2(TextWriter writer) +309 System.Web.WebPages.WebPageBase.Write(HelperResult result) +108 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action
1 body) +89 System.Web.WebPages.WebPageBase.PopContext() +310 Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +194 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList
1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +88 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList
1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList
1 filters, ActionResult actionResult) +81 System.Web.Mvc.Async.<>cDisplayClass21.1e(IAsyncResult asyncResult) +188 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38 System.Web.Mvc.Controller.I am not a developer but building the website for my wife as a hobby, so I am lost when it comes to the stack trace and to finding the issue.
I haven't changed anything on the code of any template. Just removed the package files using FTP.
Can somebody shed some light and guide me the way to solve this so that the home page comes back up?
One more thing to mention is that the home page works fine when adding /home to the domain URL
Thanks in advance for your help.
Hi Rob
Can you show the first lines of Master.cshtml? Also, can you rebuild your models builder if it's in DLL mode?
Thanks,
Alex
Hi Alex,
@{ Layout = null;
} Models Builder is running in PureLive mode
Are you using version 7?
Hi Alex,
Yes Umbraco 7 as mentioned in the initial post ;)
My issue is that I am not a developer and I don't have much experience with Umbraco or Razor so it's sometimes a bit too tricky for me to figure out what is going wrong.
I would appreciate if someone could assist with the above.
Did you try to re build the models builder?
Hi Matt,
You mean reload the models?
Yes, I tried that 2 or 3 times so far. Doesn't change anything.
What is odd to me is that the main URL doesn't work but when I go to the landing page /home it works fine.
Rob, maybe you see different pages on /hone and main URL?
Hi Alex,
It's the same page and content as the main URL is basically the home page
Any other suggestion Alex?
Do you have some internal redirects in the project or something like that?
In any case, you can maybe just do not use strongly typed models. So get values like that:
I'm still learning Umbraco so I'm just going to throw some ideas out :)
Have you tried to republish the site?
Have you checked the logs in App_Data - Logs
Hi Rob,
Think SEOChecker is still in your model and it fails because of that. Sorry to hear you needed to uninstall. Sometimes the Umbracolog comes with a more detailed error description.
Best,
Richard
Hi Richard,
I wasn't aware that it is a commercial package. I run the website for my wife more as a hobby so no need to pay for a license.
Could you let me know where your package normally stores any kind of files?
I was pretty sure I removed all files from the server. But you might be right and I missed a few?
All in the /bin folder I assume those are gone?
No files in the /bin folder which contain SEOChecker in the name.
But in the back-end, I can still see the button for the dashboard below my forms button?
That is because it ist still in applications.config also in trees.config file but that doesn't do anything.
And the dashboard.config
;)
is working on a reply...