You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Twig include debug comments break address format concat symbol detection #82
Shopware's address renderer leaves a dangling separator symbols in formatted addresses. For example with default address format company - department the output becomes '-' when both fields are empty and 'company-' when department is empty instead of omitting the separator. Reasons is that template Framework/Resources/views/snippets/render.html.twig compares the rendered snippet output against the concat symbols {% set concatSymbol = ['-', '~'] %}.
However sw_include returns the debug include comments together with rendered snippet <!-- INCLUDE BEGIN ... -->-<!-- INCLUDE END ... --> instead of the literal '-'. As a result the comparison snippetRendered|trim in concatSymbol always evaluates to false so the cleanup logic never removes the separator.
Expected behaviour
Debug include comments should not affect Shopware's address formatting logic.
Steps to Reproduce?
set address settings in backend country settings to format with company -(dash) department
have plugin activated
open a address template in storefront (or check preview in backend with matching address)
check an address without any company settings or one with company but without department
Activity