twig.js icon indicating copy to clipboard operation
twig.js copied to clipboard

Fix #708 - Allow multiple includes of a template that embeds another …

Open sdussaut opened this issue 3 years ago • 3 comments

Multiple template includes that embed other template breaks the compilation.

This PR is basically @JamesB797 's fix.

Issue: https://github.com/twigjs/twig.js/issues/708

sdussaut avatar May 12 '21 15:05 sdussaut

I can confirm this fixes my issues with the file.includes errors :+1:

ccjjmartin avatar Jul 07 '21 23:07 ccjjmartin

Me too! It's working on some client projects (as a patch)

ModulesUnraveled avatar Oct 07 '21 10:10 ModulesUnraveled

Can also confirm this solved the issue on my projects (as a patch).

sryanb avatar Oct 07 '21 20:10 sryanb

Any chance we can get this merged? The patch is working for me and is pretty key for us - thanks in advance!

ryanscherler avatar Sep 08 '22 22:09 ryanscherler

This still needs to be reviewed fully. However, after a cursory review, there is a good chance it will not get merged since it does not include tests and does not seem to address the actual underlying issues. The reported issue #708 is marked as high priority though and I was able to triage the actual issue, so it will most likely be put on the next milestone.

This PR will be left open for now, for reference at the very least, but may be superseded by another PR if the fix in this one proves insufficient.

willrowe avatar Sep 09 '22 13:09 willrowe

Tested, and worked, does need test implementation however. Thanks for the thoughts, @willrowe

RobLoach avatar Sep 20 '22 18:09 RobLoach

I took a closer look at this and think I have gotten to the bottom of what is happening. I should have some test cases ready for this soon.

willrowe avatar Sep 21 '22 14:09 willrowe

Wooo! Nice work debugging 👍 Some initial insight?

RobLoach avatar Sep 21 '22 15:09 RobLoach

The issue is definitely with the template id, the last thing I need to take a look at is why that is affecting it in this way to be sure that nothing else breaks when fixing it.

willrowe avatar Sep 21 '22 15:09 willrowe

Closing this in favor of #828 since that prevents any conflicts by avoiding storing the template instance in the registry at all.

willrowe avatar Sep 21 '22 20:09 willrowe