1
votes

I'm randomly getting the following error when I try to login to the Sitecore back end.

The model item passed into the dictionary is of type 'Sitecore.Mvc.Presentation.RenderingModel', but this dictionary requires a model item of type 'Sitecore.ExperienceAnalytics.Client.Mvc.Presentation.ExperienceAnalyticsLineChartViewModel'.

enter image description here

I experience this issue after I have build the Sitecore link databases using Sitecore Launchpad --> Control Panel --> Rebuild link databases.

When I clear the Sitecore cache using http://{your website}/sitecore/admin/cache.aspx this is error is not throwing for sometime.

Is there anyway to eliminate this error permanently ?

2
These look like default Sitecore files, have you changed any of them? It may be some corrupt files/DLLs, you could try deploying a clean version from the zip of the Sitecore web root.jammykam

2 Answers

12
votes

When you Remove Broken Links on the Core database, the Model property of the ExperienceAnalyticsLineChart rendering is erroneously deleted.

  1. Navigate to the Core database in the Content Editor of your Sitecore instance at http://{your-sitecore-url}/sitecore/shell/default.aspx?sc_content=core.
  2. Navigate to the ExperienceAnalyticsLineChart rendering in the item tree at /sitecore/client/Applications/ExperienceAnalytics/Common/Layouts/Renderings/ExperienceAnalyticsLineChart.
  3. Set the Model field to Sitecore.ExperienceAnalytics.Client.Mvc.Presentation.ExperienceAnalyticsLineChartViewModel, Sitecore.ExperienceAnalytics.Client.
  4. Save the item and click OK if prompted that the item contains broken links.
  5. Log back into Sitecore and the Launchpad will load.
2
votes

In your view you're using Sitecore.ExperienceAnalytics.Client.Mvc.Presentation.ExperienceAnalyticsLineChartViewModel instead of Sitecore.Mvc.Presentation.RenderingModel witch is the default.

If you want to use your own model you have to register it in Sitecore Navigate to /sitecore/layout/Models and add a new model in the model type add "Sitecore.ExperienceAnalytics.Client.Mvc.Presentation.ExperienceAnalyticsLineChartViewModel, YourAssemblyName" go to your View rendering item in sitecore and select your model in the Model field.

https://community.sitecore.net/developers/f/8/t/109 looks like they have same issue like you