twing icon indicating copy to clipboard operation
twing copied to clipboard

Embed tag inside extended template seems to be broken

Open ofabel opened this issue 5 years ago • 4 comments

The following template is supposed to work: https://twigfiddle.com/l3d401

It seems, that the template path/name resolution is not working as expected (TwingErrorLoader: Unable to find template). Instead of the correct template element.twig the embedded template is resolved to main.twig.

I can provide a working (or in this case not working) example, if required.

ofabel avatar Aug 23 '20 14:08 ofabel

I investigated this issue a bit further: The problem occurs if you provide a relative path to the render method. I have created a repository to illustrate the bug. This used to work somewhere around version 3.0.0.

ofabel avatar Sep 14 '20 05:09 ofabel

Hello, @ofabel have you any workaround on this?

dawidskowron avatar Jul 22 '21 07:07 dawidskowron

@dawidskowron , is it still happening with Twing 5? If so, I have to fix this.

ericmorand avatar Jul 23 '21 14:07 ericmorand

Hello, @ofabel have you any workaround on this?

Our workaround at the moment is not to use this feature. So yes, it is still broken in version 5.

ofabel avatar Jul 27 '21 08:07 ofabel

Not reproducible anymore with either Twing@5 or Twing@6.

ericmorand avatar Nov 27 '23 19:11 ericmorand