SaaS CMS has officially launched! Learn more now.

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:

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

Understanding that this thread is pretty old, I wanted to throw this in here in case other folks arrive here with the same question:

Check out the blog post for full details, but: 

The default view you want to see, as well as the publish view (i.e. the view after a content is published) can be defined in an UIDescriptor, like this:

    public class FashionProductUIDescriptor : UIDescriptor<FashionProduct>
        public FashionProductUIDescriptor()
            : base(ContentTypeCssClassNames.Container)
            DefaultView = CmsViewNames.AllPropertiesView;
            PublishView = CmsViewNames.AllPropertiesView;

With this UIDescriptor, whenever you open a content of type FashionProduct, the default view will be All Properties. And if you make changes and publish, it will stay in that mode.


And note: you would have to define an UIDescriptor for each and every of your strongly typed content type. You can't define an UIDescriptor on ProductContent or EntryContentBase as there are already framework UIDescriptor(s) for them, and having two UIDescriptors with same TypeIdentifier will break your site.

Mar 30, 2022 16:40
* 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.