Try our conversational search powered by Generative AI!

The current page is not of type ProductPageType

Vote:
 

We're using PageType Builder to define our product details page. During our initial development we've been using the catalog from ClickTalk to have items to work with. Everything is working fine with existing products/sku's but when we add new ones using the same displaytemplate as the other ones we get an issue when trying to view the product details page.

The current page is not of type ProductPageType. This often occurs when no id query string parameter is specified.

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: PageTypeBuilder.PageTypeBuilderException: The current page is not of type ProductPageType. This often occurs when no id query string parameter is specified.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[PageTypeBuilderException: The current page is not of type ProductPageType. This often occurs when no id query string parameter is specified.]
PageTypeBuilder.UI.LoadTypedCurrentPage`1.get_CurrentPage() +401
EPiServer.Web.PageExtensions.ContextMenu.SetupOnPageEdit() +27
EPiServer.Web.PageExtensions.ContextMenu.RegisterMenuScripts(Object sender, EventArgs e) +103
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Page.OnInit(EventArgs e) +105
EPiServer.PageBase.OnInit(EventArgs e) +16
System.Web.UI.Control.InitRecursive(Control namingContainer) +133
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1970

Any help would be appreciated.

#58905
May 10, 2012 16:34
Vote:
 

CurrentPage for some reason falls back to the start page which is not a ProductPageType... What's in the address bar when you get this error?

 

#58912
May 10, 2012 19:13
Vote:
 

Not sure if I understood you right, but for me the error seems like you have added a new page type, pointed the page type to use the same .aspx as the ProductPageType, is that correct?

If it is, your new page type must inherit from ProductPageType or that you make a baseclass that both ProductPageType and your new page type inhertis from + that the aspx unherts from TemplateBase<YourBaseClass>.

If not, then ignore my post. :)

#58921
May 11, 2012 10:21
Vote:
 

It's the product page which is selected from the Settings tab in commerce.

#58926
May 11, 2012 10:33
Vote:
 

When updating to Commerce R2 everything started working just fine.

#59071
May 18, 2012 14:43
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.