Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025

 


Article

Pages that have Social Sharing widgets on them throw an exception after upgrade to Sitefinity 11.1

« Go Back

Information

 
Article Number000092595
EnvironmentProduct: Sitefinity 
Version: 11.1
OS: All supported OS versions 
Database: All supported Microsoft SQL Server versions
Question/Problem Description

After upgrading an existing project to Sitefinity CMS version 11.1, an error is thrown on pages that have Social sharing widgets placed on them.
 

Steps to ReproduceStart with an existing project that has Social share widgets placed on some of the pages.
1. Upgrade the project to Sitefinity CMS version 11.1.
2. Browse or edit the pages that have the social sharing widgets placed on them to see the exception (or observe the Error.log)
Clarifying Information

After upgrading an existing project to Sitefinity CMS version 11.1, pages that have Social sharing widgets placed on them exhibit the following behavior: 

  • Pages with MVC Social share widget
    the page renders fine, 
    an exception is logged in the Error.log; 
    an exception is shown where the widget has been placed when editing the page 

  • Pages with WebForms Social share widgets (Facebook Like and Page sharing widgets):
    throw an exception when viewed on the frontend;
    an exception is shown where the widget has been placed when editing the page;
    an exception is logged in the Error.log

Error MessageThe controller with the name 'Telerik.Sitefinity.Frontend.SocialShare.Mvc.Controllers.SocialShareController' cannot be resolved

--------------

Type : System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Type "Telerik.Sitefinity.Web.UI.PublicControls.PageSharing, Telerik.Sitefinity" cannot be resolved.
Source : Telerik.Sitefinity.Utilities
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Type GetType(System.String, Boolean, Boolean)
HResult : -2147024809
Stack Trace : at Telerik.Sitefinity.Utilities.TypeConverters.TypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Telerik.Sitefinity.Modules.ControlManager`1.LoadControlOrObject(ObjectData objectData, CultureInfo culture)
at Telerik.Sitefinity.Modules.ControlManager`1.LoadControl(ObjectData controlData, CultureInfo culture)
at Telerik.Sitefinity.Modules.Pages.DraftProxyBase.editor_ControlAdd(Object sender, ZoneEditorEventArgs e)

--------------

Type : System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Type "Telerik.Sitefinity.Web.UI.PublicControls.FacebookLike" cannot be resolved.
Source : Telerik.Sitefinity.Utilities
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Type GetType(System.String, Boolean, Boolean)
HResult : -2147024809
Stack Trace : at Telerik.Sitefinity.Utilities.TypeConverters.TypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Telerik.Sitefinity.Modules.ControlManager`1.LoadControlOrObject(ObjectData objectData, CultureInfo culture)
at Telerik.Sitefinity.Modules.ControlManager`1.LoadControl(ObjectData controlData, CultureInfo culture)
at Telerik.Sitefinity.Modules.Pages.DraftProxyBase.editor_ControlAdd(Object sender, ZoneEditorEventArgs e)
Defect/Enhancement Number
Cause
All Social sharing widgets, except for the Twitter widget and Twitter Feed have been removed with Sitefinity CMS 11.1. This change affects multiple components of the system.
Since an upgrade script to remove the widgets would remove user data, upgrading to Sitefinity CMS 11.1 removes all unused components, but does not touch the website pages.
If there is a page that has a social widget placed on it, the page is no longer able to find the widget type, since it has been removed in version 11.1. Therefore the exception is thrown. 
Resolution
Remove the widgets from the pages. This can be done:

1. Manually
Edit each page which contains social widgets and manually remove the social widget(s) from it.

2. Execute a script against the Sitefinity CMS website database:
Important: Make sure to perform a full database backup beforehand 

Run the following SQL script against the database (modify it to specify the Sitefinity database name): 
 
/* Delete control permissions first */   

DELETE  
FROM dbo.sf_object_data_sf_permissions  WHERE id IN ( 
SELECT DISTINCT id 
FROM [sf_object_data] 
WHERE object_type='Telerik.Sitefinity.Mvc.Proxy.MvcControllerProxy' AND caption_ LIKE '%Social share%' 
OR 
object_type IN ('Telerik.Sitefinity.Web.UI.PublicControls.FacebookLike', 'Telerik.Sitefinity.Web.UI.PublicControls.PageSharing', 'Telerik.Sitefinity.Web.UI.PublicControls.PageSharing, Telerik.Sitefinity') 
)
 
/* Delete the social sharing controls for MVC and WebForms */ 

DELETE  
FROM [sf_object_data] 
WHERE object_type='Telerik.Sitefinity.Mvc.Proxy.MvcControllerProxy' AND caption_ LIKE '%Social share%' 
OR 
object_type IN ('Telerik.Sitefinity.Web.UI.PublicControls.FacebookLike', 'Telerik.Sitefinity.Web.UI.PublicControls.PageSharing', 'Telerik.Sitefinity.Web.UI.PublicControls.PageSharing, Telerik.Sitefinity')

Then, restart the website application pool and run the site.


NOTE: This script will remove any MVC (Social share) or WebForms (Facebook Like, Page sharing) widgets form the pages. Doing this might potentially affect the widgets ordering or page styling since the widgets will no longer be there after running the script.
Please verify that the pages look as expected, and apply any reordering/styling changes if necessary.
 
Workaround
Notes
Attachment 
Last Modified Date11/12/2018 3:00 PM