RobErskine / Craft-User-Manual

📚 Help Section Plugin for Craft CMS.
MIT License
85 stars 17 forks source link

Craft 5 version needs registerTwigExtension instead of addExtension #45

Closed mike-moreau closed 1 month ago

mike-moreau commented 1 month ago

Hey there,

I noticed that with the Craft 5 version of User Manual there is a lingering issue that occurred in the Craft 4 version also.

In the main plugin file, the twig extension needs to be added in this way:

private function _addTwigExtensions(): void
    {
        Craft::$app->view->registerTwigExtension(new UserManualTwigExtension);
    }

This would resolved a few related issues too:

@RobErskine could you roll in this fix when it's convenient?

RobErskine commented 1 month ago

hey @mike-moreau thanks for bringing this to my attention. I just dropped a new release (https://github.com/RobErskine/Craft-User-Manual/releases/tag/5.0.2) that has this fix! Let me know if there is anything else I can take a look at.

mike-moreau commented 4 weeks ago

Thank you!