Progress KB - Pages that have Social Sharing widgets on them throw an exception after upgrade to Sitefinity 11.1 and above




Feedback
Did this article resolve your question/issue?

   

Article

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

« Go Back

Information

 
TitlePages that have Social Sharing widgets on them throw an exception after upgrade to Sitefinity 11.1 and above
URL NamePages-that-have-Social-Sharing-widgets-on-them-throw-an-exception-after-upgrade-to-Sitefinity-11-1
Article Number000145262
EnvironmentProduct: Sitefinity 
Version: 11.1, 11.2, 12.x, 13.x
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.
Verify that the pages look as expected, and apply any reordering/styling changes if necessary.
 
Workaround
Notes
Last Modified Date6/28/2020 3:37 PM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.