-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
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
hotfix: processTemplateWithoutRender issue #2583
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional test passed - I can confirm this resolves the issue on my end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting issue, didn't realise how angular signals interop with injection contexts but it makes sense.
Nice workaround to provide a static option within the constructor, although I found a slightly simpler solution from the signal code as it contains options to manually specify the injector, which we happen to be passing anyways when creating standalone.
I've opened up an alternate pr #2588 to do this, which will supercede this PR if you're happy with the change
PR Checklist
Description
A hotfix for an issue where any templates processed without being rendered (e.g. startup templates, which are processed on app start without rendering), would throw an error. This is a regression issue introduced by #2531. See this mattermost thread for an identification of the issue.
Dev Notes
Error log on master, for
plh_kids_tz
deployment:The issue arises when we try to instantiate a template container component programmatically, outside of Angular's component lifecycle, as we do in the
TemplateProcessService.processTemplateWithoutRender()
method (which is called to handle lifecycle action templates). In that case, theeffect()
in the component's constructor, introduced in #2531, throws an error.Git Issues
Closes #
Screenshots/Videos
If useful, provide screenshot or capture to highlight main changes