0

I'm building a content website in Craft CMS. I use single entries to output images, but after I updated Craft to 3.2.1, this doesn't work. Everything else is working fine.

I get this error: Twig Runtime Error – Twig\Error\RuntimeError Key "1" in object with ArrayAccess of class "craft\elements\db\AssetQuery" does not exist.

<div class="detail_content_photos3 row">
    <div class="detail_content_photos3_photo col-xs-12 col-md-4">
        <img src="{{ entry.videoPhoto3x3[0].url }}"/>
    </div>
    <div class="detail_content_photos3_photo col-xs-12 col-md-4">
        <img src="{{ entry.videoPhoto3x3[1].url }}"/>
    </div>
    <div class="detail_content_photos3_photo col-xs-12 col-md-4">
        <img src="{{ entry.videoPhoto3x3[2].url }}"/>
    </div>
    <div class="detail_content_photos3_photo col-xs-12 col-md-4">
        <img src="{{ entry.videoPhoto3x3[3].url }}"/>
    </div>
    <div class="detail_content_photos3_photo col-xs-12 col-md-4">
        <img src="{{ entry.videoPhoto3x3[4].url }}"/>
    </div>
    <div class="detail_content_photos3_photo col-xs-12 col-md-4">
    <img src="{{ entry.videoPhoto3x3[5].url }}"/>
    </div>
</div>

Your Answer

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

Browse other questions tagged or ask your own question.