Bug reports Found a bug? Post it here please.
Version 7.x > Bug reports > Error clicking on product in portal engine View modes: 
User avatar
Guest
coconnell - 10/18/2012 2:35:00 PM
   
Error clicking on product in portal engine
Description*: There is a product in my list that I have created that works when you click on it in the live site and does not throw any errors. This however was a test document and recently I have realized that I would like to change the Document Type completely anyway. I would like to delete the Document Type but I can't because there are documents attached to it aka this one. When I click on the product using the Portal Engine I recieve the following message "Internal Server Error. Would you like to refresh the UI?" Refreshing does not do anything and when I go into the document type to delete the document or check the event logs the full error and stacktrace show as follows


Server Error in '/' Application.
________________________________________
Object must implement IConvertible.
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: Object must implement IConvertible.

Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[InvalidCastException: Object must implement IConvertible.]
System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +12819896
CMS.DataEngine.SimpleDataClass.SetData(Int32 columnIndex, Object value) +291
CMS.DataEngine.SimpleDataClass.LoadData(IDataContainer data) +235
CMS.Ecommerce.SKUTreeNode.NewInstanceFromDataContainer(IDataContainer data, String className, TreeProvider existingTreeProvider) +232
CMS.DocumentEngine.TreeNode.New(IDataContainer data, String className, TreeProvider treeProvider) +102
CMS.DocumentEngine.TreeProvider.SelectSingleNode(String siteName, String aliasPath, String cultureCode, Boolean combineWithDefaultCulture, String className, Boolean selectOnlyPublished, Boolean checkPermissions, Boolean selectCoupledData) +1897
CMS.DocumentEngine.TreeProvider.SelectSingleNode(Int32 nodeId, String cultureCode, Boolean combineWithDefaultCulture, Boolean coupledData) +1076
CMS.DocumentEngine.TreeProvider.SelectSingleNode(Int32 nodeId, String cultureCode, Boolean combineWithDefaultCulture) +19
CMS.UIControls.CMSDeskPage.GetDocumentPageUrlInternal(UIPageURLSettings settings) +546
CMS.UIControls.CMSDeskPage.GetDocumentPageUrl(UIPageURLSettings settings) +63
CMSModules_Content_CMSDesk_Default.Page_Load(Object sender, EventArgs e) +314
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.EventHandler.Invoke(Object sender, EventArgs e) +0
CMS.UIControls.CMSPage.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/21/2012 12:57:57 AM
   
RE:Error clicking on product in portal engine
Hi,

Just for other users reference - this issue was solved by deleting and re-creating the product. On other customer solved this issue by removing additional fields from the product document type and adding them back.

Best regards,
Juraj Ondrus