Skip to main content

Posts

Showing posts with the label experience editor

Sitecore bug 520726 - EE strip HTML tags for Single-line text if we edit and save other fields

 The Problem We are on Sitecore 10.1 update 2. We had a business requirement to allow HTML tags in single-line text fields so that page headings and subheadings can have superscripts etc. in them. We understand that for security reasons, Sitecore encodes all the HTML tags entered into the fields. This needed us to make sure to add logics in our backend to ensure that the HTML tags gets decoded so that they can be rendered at the front end. So far so good and everything went as planned. After the customization, we were able to see the HTML tags added to single-line text fields getting rendered properly at front-end.  Then where is the problem? We did a few more edits on the page and observed that HTML tags added to Single-Line text fields earlier got stripped off during subsequent edits and page saves. Here is a video of the issue -  The Research This issue was also reproducible on sandbox instances. This proved that it was not due to any of the customizations done in our solution. We r

Sitecore bug 563584 - Lock and Edit stops working in Experience Editor

 The Problem While working in Experience Editor in Sitecore 10.1.2, content authors started reporting that clicking on Lock and Edit link doesnt lock the page sometimes. Content Authors have to reload the page to work or use Content Editor to Edit the page. This has been reported by multiple users at multiple times and is not consistently reproducible. The Research We have observed that when Lock and Edit is unresponsive, it doesnt trigger any requests in Network tab in browser dev tools. When Lock and Edit is responsive, it triggers several requests in Network tab. The HTML for Lock and Edit appears same in both the cases without any missing fields. The console tab doesnt contain any errors. To learn more on this issue, I created a Sitecore Support ticket. Sitecore support representative was able to reproduce the issue on her local instance as well. Below is the response from Sitecore -  "I was able to reproduce this behavior in the local environment and, since this is not the ex

Replace SXA based SelectRendering dialogs by vanilla Sitecore SelectRendering dialogs

This post intends to get you familiar with how Sitecore manages SelectRendering dialogs found in  Experience Editor , how  Sitecore Experience Accelerator (SXA)  module is able to override those dialogs and how we can still use vanilla Sitecore based SelectRendering dialogs even after installing SXA module. We are working on upgrading our application from Sitecore 8.2 to Sitecore 10.1.1. We have 100+ sites in our  existing   Sitecore instance and we are moving them from vanilla Sitecore sites to SXA based sites. Problem While testing the pages in Experience Editor, we noticed that the SXA based SelectRendering Dialog is different from vanilla Sitecore 10.  For e.g. when you click on Add Here to add a rendering  on your page  in Experience Editor in Sitecore 10, below dialog opens up -  Due to the structure in our legacy Sitecore 8 application, lots of tabs started appearing in SelectRendering dialog which looked confusing as in snapshot above. This also created another problem. With so

EnableWorkflow attribute in Sitecore's site definitions

EnableWorkflow attribute defines if the workflow support for the site is enabled or not. This is an important attribute in site definition if you want workflow to work correctly. If you miss this, you may create problems for content authors which we will discuss in the post.  The Problem While testing a customization in Sitecore workflow, we stumbled upon following issue -  Content authors created a page in Experience Editor and left the page in Draft mode expecting all the data source items they edited on page are also in Draft state. Then a nightly automatic publish published all draft data source items to the live servers. Why did this happen? The steps to replicate. Create a new page in Sitecore  Open Experience Editor and add a component that needs a data source.  Select 'create a new data source' in the popup window.  Save the page in experience editor  Open the data source in the Content editor and take a look at the workflow state section. It will be blank instead of ha

Know in JavaScript if user is in Experience Editor mode in Sitecore

Sometimes we  simply want to know in JS if the user is on regular site view or experience editor view or any other view. In JS, we can do this by below lines of code -  var isEditMode = function ( ) { return typeof Sitecore !== "undefined" && Sitecore && Sitecore.PageModes && Sitecore.PageModes.PageEditor; } var isPreviewMode = function ( ) { return typeof Sitecore !== "undefined" && !isEditMode() } var isNormalMode = function ( ) { return typeof Sitecore === "undefined" }