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!

3
  • 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? May 28, 2019 at 19:56
  • Some additional stack trace would be helpful from the YSOD May 29, 2019 at 0:49
  • @MichaelWest No I haven't manipulate the rendering and it is happening with all the rendering. May 29, 2019 at 4:17

1 Answer 1

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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