View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005743 | OXID eShop (all versions) | 2.3. Extensions (modules, themes) | public | 2014-04-24 14:29 | 2023-11-27 15:23 |
Reporter | revoltek | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Summary | 0005743: Module is activ even if onActivate Event failed | ||||
Description | Hello, if an Module uses the onActivate Event it should only be active if this method runs without an error. In my case i check for file perms in the onActivate method so when this failed an exception is thrown. The exception is displayed but the module is also activated. | ||||
Tags | No tags attached. | ||||
Theme | Azure | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
a nicer module-handling would really be appreciated, for me i would prefer an exception instead of having to return false/true (gives more power to specify more-detailed information instead of just having a nothing-telling "no, cant activate" as choice) quick workaround could be to deactivate that module programmatically within your onActivate-event (loading modules and disable it). |
|
There might be a misunderstanding about what the onActivate event is: It only tells about an activation happened and gives you an opportunity to do additional things based on this information. In case you want the module to be inactive if something happens in your activation code, you can add a try / catch block yourself and call the ModuleActivationService to deactivate the module again. |