1

I am using Sitecore 9.1.1 and recently started getting error while adding any rendering from experience editor to any page/item on Site.

Adding rendering on placeholder is opening a model window to select the rendering and then select the datasource after selecting the datasource and clicking the OK button is throwing an error as given in below screenshot.

enter image description here

I have already replaced bin folder as well as Sitecore folder from the blank installation but it didn't help.

Any help would be appreciated!

  • Does this happen for all pages or just the one? Did you manipulate the renderings in any way specifically that can be reproduced on other pages? – Michael West May 28 at 19:56
  • Some additional stack trace would be helpful from the YSOD – Richard Hauer May 29 at 0:49
  • @MichaelWest No I haven't manipulate the rendering and it is happening with all the rendering. – Yogesh Sharma May 29 at 4:17
0

Have you upgraded your Sitecore 8.2 (or previous version) to Sitecore 9.1.1?

If this is the case, then you will need to change ids of the placeholders.

Old Dynamic Placeholder Pattern (Format) was content_{ABCEBD6BD-1CB5-1F56-250F-F82D8D84C90E}

New Dynamic Placeholder (with Sitecore 9.0 and above) pattern is Content-{ABCEBD6BD-1CB5-1F56-250F-F82D8D84C90E}-0

means new placeholder format should be ({placeholder key}-{rendering unique suffix}-{unique suffix within rendering})

Wrong pattern of the placeholder key may be causing this error.

  • I haven't upgraded it. I am working on 9.1.1 only also it's not about dynamic placeholder. – Yogesh Sharma May 29 at 4:18
0

I did some investigation and found that in Experience Editor key property was missing from <code> element. This element is for Experience Editor. I found that "key" attribute was missing from the element and if I am adding the key attribute on element it was working fine.

There is post call happening which is going with some data when you are clicking on add to placeholder button and when I did check the value which was sending for that API call it was missing "plaholderKey" attribute and that was reason I was getting this error.

No having "key" attribute have many reasons like any of your JS code is removing it for some reason to make something in your front end and same JS you are using in Experience Editor so it is removing here also that should not happen. In that case you need to scan your JS code which is doing this.

In my case I am using VueJs for front end development and VueJs also use key attribute on element for some other stuff to work. And that was reason "key" attrbute was missing from element.

In my case I added few code updates in my VueJs framework as per given in Error in adding rendering from experience editor post and it works for me.

This may help if you are also having the similar issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.