We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
8.3
6.6.9.0
1.0.3
Hi, we are using a twig-macro in our themes to provide IDs for the searchMedia Twig-function.
searchMedia
Example:
{% sw_extends '@Storefront/storefront/layout/navigation/navigation.html.twig' %} {% block layout_main_navigation %} {% set iconMediaIds = [] %} {% set iconMediaIds = _self.recursiveCollectIconMediaIds(page.header.navigation.tree, iconMediaIds) %} {% set iconMediaCollection = searchMedia(iconMediaIds, context.context) %} {% macro recursiveCollectIconMediaIds(treeItems, iconMediaIds) %} {% for treeItem in treeItems %} {% set iconMediaId = treeItem.category.translated.customFields.custom_category_image %} {% set iconMediaIds = iconMediaId ? iconMediaIds|merge([iconMediaId]) : iconMediaIds %} {# recoursion #} {% if treeItem.children is defined and treeItem.children|length > 0 %} {% set iconMediaIds = _self.recursiveCollectIconMediaIds(treeItem.children, iconMediaIds) %} {% endif %} {% endfor %} {% return iconMediaIds %} {% endmacro %} {% dump(iconMediaIds) %} {{ parent() }} {% endblock %}
After installing and activating the FroshDevelopmentHelper plugin, we got this Error
We tried to remove the return, because of the scope of iconMediaIds, but these leads to another error:
return
iconMediaIds
Reminds me a lot of issue shopware/shopware#3680
Using return in a macro should not lead to error Class "SwTwigFunction" not found
The text was updated successfully, but these errors were encountered:
After upgrading to 6.6.10.0 I get this error on dev env with enabled plugin.
Sorry, something went wrong.
No branches or pull requests
PHP Version
8.3
Shopware Version
6.6.9.0
Plugin Version
1.0.3
Actual behaviour
Hi, we are using a twig-macro in our themes to provide IDs for the
searchMedia
Twig-function.Example:
After installing and activating the FroshDevelopmentHelper plugin, we got this Error
We tried to remove the

return
, because of the scope oficonMediaIds
, but these leads to another error:Reminds me a lot of issue shopware/shopware#3680
Expected behaviour
Using return in a macro should not lead to error Class "SwTwigFunction" not found
Steps to Reproduce?
The text was updated successfully, but these errors were encountered: