Closed braican closed 1 month ago
Thanks @braican! Will try to take a look over the next few days to get this merged in.
@RobErskine Any progress on this? This change also fixes an issue when applying existing project config settings on a fresh install: can't apply existing project config: Unable to register extension "roberskine\usermanual\twigextensions\UserManualTwigExtension" as it is already registered.
@RobErskine would be nice to see this merged in
This has been included in 5.0.2: https://github.com/RobErskine/Craft-User-Manual/releases/tag/5.0.2
This PR moves to the
registerTwigExtension
method to register the Twig extension, as documented in the 4.x docs: https://craftcms.com/docs/4.x/extend/extending-twig.html#register-a-twig-extension. This fixes theTwig instantiated before Craft is fully initialized.
warning that the plugin is throwing on each request in Craft 4 installations.Fixes https://github.com/RobErskine/Craft-User-Manual/issues/32.
How to test
Twig instantiated before Craft is fully initialized.
warning doesn't appear in the web logs.