Disable on-page editing for variants or stop from switching to on-page edit on publishing


When an editor publishes changes while using the All properties view in EPiServer commerce, they're automatically switched to the On-page editing, causing a server error to be displayed.

Setting the default view seems to work just fine for EPiServer CMS but not Commerce. Is there any way I can disable this automatic switching between views on EPiServer commerce?

I tried disabling the on-page edit view, but that causes another issue: when publishing the page, the page never displays that it was published successfully. If I refresh the page, then it does appear that the page is published with the latest changes.

I found the same issue here, but it wasn't solved yet: https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2019/8/disable-automatic-switch-to-on-page-editing-when-publishing-in-episerver-commerce-/

Sep 10, 2020 15:50

I figured out what was causing the error. We found that our CategoryController was taking CatalogContentBase as its type parameter (instead of Category), and the BaseVariationContent inherits from that type so the controller was attempting to render a view for the BaseVariationContent type in the previews. We changed the type parameter and now there is no attempt to render views for variants.

Edited, Oct 21, 2020 13:39
* 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.