8000 [Bug]: current value for nested pimcore blocks is wrong with new syntax · Issue #17927 · pimcore/pimcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Bug]: current value for nested pimcore blocks is wrong with new syntax #17927
@cadeyrn

Description

@cadeyrn

Pimcore version

11.5.0

Steps to reproduce

{% for i in pimcore_block('foo').iterator %}
  {% for j in pimcore_block('bar').iterator %}

  {% endfor %}

  {{ dump(pimcore_block('foo').current) }}
{% endfor %}
{% pimcoreblock 'foo' %}
  {% pimcoreblock 'bar' %}

  {% endpimcoreblock %}

  {{ dump(_block.current) }}
{% endpimcoreblock %}

Create two items for "foo" and three "bar" items for the first "foo".

Actual Behavior

The first block dumps:

0
1

The second block dumps:

-1
-1

Without the inner block ("bar") dump(_block.current) has the correct values.

Expected Behavior

The _block variable should be scoped to the block, so the inner block should not affect the _block variable of the outer block.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0