Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

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

Vote:
 

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-/

#227696
Sep 10, 2020 15:50
Vote:
 

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.

#229693
Edited, Oct 21, 2020 13:39
Vote:
 

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

https://world.optimizely.com/blogs/Quan-Mai/Dates/2019/8/enable-sticky-mode-for-catalog-content/

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:

    [UIDescriptorRegistration]
    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.

#277444
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.