Reputation: 50362
Have this weird error while using Marionette's CompositeView:
Marionette CompositeView: Uncaught ItemViewContainerMissingError: The specified `itemViewContainer` was not found: tbody
The element that is not found tbody
is in the template. I've looked over the rest of my project and I've done the same thing over many times without a problem. It must be something small that I am missing.
Is there a particular anti-pattern that is associated with this error?
Thanks!
Upvotes: 8
Views: 1015
Reputation: 4367
I had the same error. My problem was that the itemViewContainer
(ul
, in my case) wasn't in the main div.
I had this code before:
<div class="row page-width">
<div class="large-12 columns">
<img src="assets/images/help.png" width="35" height="35" alt="help">
<strong> Help</strong>
</div>
</div>
<div><ul class="main-tabs"></ul></div>
So changing it to be included in the main div, solved it for me:
<div class="row page-width">
<div class="large-12 columns">
<img src="assets/images/help.png" width="35" height="35" alt="help">
<strong> Help</strong>
</div>
<ul class="main-tabs"></ul></div>
Upvotes: 1
Reputation:
In the past when I have run into this error, it was caused by rendering the view before it was shown onto the page.
Specifically, I reset the collection, which caused the view to re-render before I had displayed it on the page.
Upvotes: 6