Empty Placeholder Double “Add Here” Error

On a recent project I was working on, I came across a very interesting error. When I was in Experience Editor and trying to add some components to a brand new page, there were 2 “Add here” buttons on the top and bottom of the empty placeholder. However, the bottom one would return an error that just responded as “An Error Occurred”. I reported this error to Sitecore to see if they could help point us to a solution since this was impacting the client’s content authoring process. It was deemed a low priority ticket since there was still an “Add here” button that worked properly.

In the Developer Tools, I noticed that the site was throwing a “Could not find the rendering in the HTML loaded from server” error in the Javascript. I found that this Javascript issue had already been reported and a hotfix was created. This error was also fixed in Sitecore 8.0 Update-3, the project I was working on was on Sitecore 8.0 Update-2. I implemented the hotfix, but the same issue was still persisting. There was some confusion with the solution as it is a solution that has both MVC and Web Forms projects. So, there was some question as to being able to have some of these placeholders mixing with the other framework. Sitecore Support suggested to create a new placeholder for the “Global Components Placeholder” to be used. This wasn’t an issue since it was working in other instances. After months of going back and forth trying different solutions, and even trying to get Sitecore to duplicate the issue, Sitecore finally came up with a strange solution that ended up working for this client. We initially thought it was the implementation of Dynamic Placeholders in the solution. However, this wasn’t having issues everywhere where we implemented Dynamic Placeholders, just in this specific instance. It ended up being a silly issue where the Dynamic Placeholder wasn’t wrapped in a <div>. Once this was done, it started working as expected. This issue was not specifically for Dynamic Placeholders either. Regular Sitecore Placeholders would also have this same issue if it wasn’t wrapped in a <div>.

This ticket has been submitted to Sitecore for their internal team to fix.