When installing my module I want to check some site config settings and if my requirements are not met I want to notify the user that the module was not installed.
How do I do this (can’t seem to find anything about this in the module development docs).
Hi Derek,
that doesn’t seem to work. It will just say “Module installed” in the yellow flash message at the top.
If you look at the module though it will say “Not installed” (since I abort the install when setting that error message).
It’s important to note that this is during install (in the _module_install() function). Maybe that has something to do with it?
Yes, my mistake, as the module home page that is called overwrites the page body set by the Display class error_message() method. You can use
return $OUT->fatal_error('Your error message');
Which halts script execution and uses the user error message specialty template to display the error.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.