Skip to content
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

Using the plugin in config files #9

Open
davorpeic opened this issue Feb 8, 2024 · 1 comment
Open

Using the plugin in config files #9

davorpeic opened this issue Feb 8, 2024 · 1 comment

Comments

@davorpeic
Copy link

Hi,

great plugin btw!
I'm trying to use the plugin together with Contactus, form part is fine, but when I try to get the cryptograpgher instance in config/contact-us.php it cant load it, any change to load maybe plugin somehow at load, so I get access to plugin in that moment?

Thanks

@rungta
Copy link
Member

rungta commented Jul 19, 2024

Hi @davorpeic, sorry this issue slipped through the cracks in my inbox. Can you share some code where you’re running into an error loading the plugin in the config file?

Is it possible to defer running your code, because Craft probably hasn’t finished loading all plugins when it is processing config files. Try hooking on to the craft\services\Plugins::EVENT_AFTER_LOAD_PLUGINS event perhaps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants