Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Twig pimcore_iterate_block() UnderflowException: There are no indexes to pop from as index list is empty #5272

Open
ceefour opened this issue Nov 16, 2019 · 0 comments

Comments

@ceefour
Copy link
Contributor

@ceefour ceefour commented Nov 16, 2019

Bug Report

Expected behavior

Empty HTML output.

Actual behavior

image

UnderflowException RuntimeError
HTTP 500 Internal Server Error
An exception has been thrown during the rendering of a template ("There are no indexes to pop from as index list is empty").

Exceptions 2Logs 2Stack Traces 2
Twig\Error
RuntimeError
in app/Resources/views/Includes/sidebar.html.twig (line 11)
Klook.com<script type='text/javascript'>(function(d, sc, u) { var s = d.createElement(sc), p = d.getElementsByTagName(sc)[0]; s.type = 'text/javascript'; s.async = true; s.src = u; p.parentNode.insertBefore(s,p); })(document, 'script', '//cdn.klook.com/affiliate_web/s/dist/desktop/affiliate_base_v3.5.js')</script>{{ pimcore_areablock('content') }}

{% for i in pimcore_iterate_block(pimcore_block('teasers')) %} {{ pimcore_snippet('teaser') }} {% endfor %}
{% set articleSelect = pimcore_select('blogArticles', {

Steps to reproduce

  1. You can use the built-in sidebar from twig-demo-basic
  2. Delete all teasers from the iterable blocks
  3. Template code:
<div class="teasers">
    {% for i in pimcore_iterate_block(pimcore_block('teasers')) %}
        {{ pimcore_snippet('teaser') }}
    {% endfor %}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.