Bug reports Found a bug? Post it here please.
Version 5.x > Bug reports > ShoppingCartItemSelector Error View modes: 
User avatar
Member
Member
eric-datausa - 2/16/2010 9:59:16 PM
   
ShoppingCartItemSelector Error
When I add the cmsdatalist webpart to the page, using the ShoppingCartItemSelector.ascx I recieve the following error:

[CMSDataProperties.LoadTransformation]: \CMSModules\Ecommerce\Controls\ProductOptions\ShoppingCartItemSelector.ascx.cs(1): error ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 2/17/2010 6:17:58 AM
   
RE:ShoppingCartItemSelector Error
Hello,

Could you please tell me if you use custom layout for the web part? If so, could you please try to disable the custom layouts (http://devnet.kentico.com/docs/devguide/customizing_web_part_layout.htm)? It seems to me that this could be the cause of your issue:

Do not remove any controls from the layout

It's important to keep all the controls in the layout. If you need to hide some of them, you can add Visible="False" attribute to the control, but the control must stay in the layout so that the web part keeps working.

This issue may also cause problems when upgrading to a new Kentico CMS version - if some of the built-in web parts uses a new control an you use your web part layout created in the previous version, the web part may stop working. Please be sure to test your web site after an upgrade carefully if you're using web part layouts.



Best regards,
Helena Grulichova

User avatar
Member
Member
eric-datausa - 2/18/2010 12:15:08 AM
   
RE:ShoppingCartItemSelector Error
I have not changed any of the built in web parts. I added the Product column multi view and the data grid errors out.
The complete error is as follows:

Event ID: 31151
Event type: Error
Event time: 2/17/2010 11:12:53 PM
Source: Controls
Event code: LOADTRANSFORMATION
User name: Administrator

Description: Message: [CMSDataProperties.LoadTransformation]: \CMSModules\Ecommerce\Controls\ProductOptions\ShoppingCartItemSelector.ascx.cs(1): error ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).
Stack Trace:
at System.Web.UI.TemplateParser.ProcessException(Exception ex)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseReader(StreamReader reader, VirtualPath virtualPath)
at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)
at System.Web.UI.TemplateParser.ParseInternal()
at System.Web.UI.TemplateParser.Parse()
at System.Web.UI.TemplateParser.Parse(ICollection referencedAssemblies, VirtualPath virtualPath)
at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.UI.TemplateControl.LoadTemplate(VirtualPath virtualPath)
at System.Web.UI.TemplateControl.LoadTemplate(String virtualPath)
at CMS.Controls.CMSAbstractDataProperties.LoadTransformation(Control parent, String transformationName, Boolean showEditDelete)
at System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult result, Boolean keyFromVPP, VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode)
at System.Web.Compilation.BuildManager.GetVPathBuildResultFromCacheInternal(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.UI.BaseTemplateParser.GetReferencedType(VirtualPath virtualPath, Boolean allowNoCompile)
at System.Web.UI.BaseTemplateParser.GetUserControlType(VirtualPath virtualPath)
at System.Web.UI.MainTagNameToTypeMapper.ProcessUserControlRegistration(UserControlRegisterEntry ucRegisterEntry)
at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 2/18/2010 12:01:12 PM
   
RE:ShoppingCartItemSelector Error
Hello,

Did you chenge the transformations of Product datalist? (use a different one or change the default one?)

Did you upgrade before the issue?

Did it work some earlier or this error occurs on your site since the installation?

Thank you in advance for your reply.

Best regards,
Helena Grulichova

User avatar
Member
Member
eric-datausa - 2/18/2010 4:24:38 PM
   
RE:ShoppingCartItemSelector Error
I have not changed any of the transformations. It is using the Ecommerce_ProductsList transformation.

I upgraded from 4.1, and I have not used any of the ecommerce features prior to the upgrade.

Here is a copy of the transformation:

<%@ Register Src="~/CMSModules/Ecommerce/Controls/ProductOptions/ShoppingCartItemSelector.ascx" TagName="CartItemSelector" TagPrefix="uc1" %>
<div class="ProductPreview">
<div class="ProductBox">
<div class="ProductImage">
<a href="<%# GetDocumentUrl() %>" style="display:block;" title="<%# ResHelper.LocalizeString(Convert.ToString(Eval("SKUName", true))) %>">
<%# EcommerceFunctions.GetProductImage(Eval("SKUImagePath"), 140, Eval("SKUName", true))%>
</a>
</div>
<a href="<%# GetDocumentUrl() %>" title="<%# ResHelper.LocalizeString(Convert.ToString(Eval("SKUName", true))) %>">
<span class="ProductTitle">
<%# HTMLEncode(ResHelper.LocalizeString(Convert.ToString(Eval("SKUName")))) %>
</span>
</a>
<div class="ProductPrice">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="left">
<%# EcommerceFunctions.GetFormatedPrice(Eval("SKUPrice"), Eval("SKUDepartmentID")) %>
</td>
<td class="right">
<uc1:CartItemSelector id="cartItemSelector" runat="server" SKUID='<%# ValidationHelper.GetInteger(Eval("SKUID"), 0) %>' SKUEnabled='<%# ValidationHelper.GetBoolean(Eval("SKUEnabled"), false) %>' AddToCartImageButton="button_add04.gif" ShowProductOptions="false" />
</td>
</tr>
</table>
</div>
<div class="ProductFooter">
</div>
</div>
</div>

Thank you for your response.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 2/22/2010 9:21:43 AM
   
RE:ShoppingCartItemSelector Error
Hello,


the transformation is the default one, it is really strange. Could you please send us the export of your 4.1 site to support@kentico.com? We would inspect it to know more.

Best regards,
Helena Grulichova