Posts

Showing posts with the label MVC

SOLVED: ERROR Rendering control not found for Item in Sitecore

A simple solution (maybe too obvious to some) to a rather cryptic error. This error occurs if you use a MVC rendering (.cshtml or controller rendering) on a page whose Layout item points to a .aspx file. As in, make sure you have a MVC layout when adding MVC renderings to a page. Duh!

RESOLVED: Uncaught TypeError: Cannot read property 'parent' of null

While testing a few pages in page editor, I started running into this error: Uncaught TypeError: Cannot read property 'parent' of null This would happen when trying to add a new component while in edit mode. Since the error wasn't very descriptive and researching it online was leading me down the wrong path as this js error usually occurrs due to collision with jquery plugin ($ issue). So as a trial and error method I started removing the components one by one to see if the "Add Here" buttons would show up. I was able to trace it back to a listing component that was had a couple of Partial Views included in the markup. The culprit: Using @Html.PartialView() to rendering partial views within a view rendering. The fix: For the time being I am checking the Page Mode to load or skip the partial views.  I know this is not the best solution. Please let me know if someone has a better solution. I was looking to statically bind the renderings instead of usin