View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012629 | mantisbt | plug-ins | public | 2010-12-23 03:24 | 2024-06-09 11:09 |
Reporter | cas | Assigned To | dregad | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 1.2.4 | ||||
Summary | 0012629: Conditions in the init routine of plugin fail | ||||
Description | In my plugin I wanted activate an event based upon config of the plugin. The code I use is: Is there a correct option to achieve this behavior? | ||||
Additional Information | I also tried to have this setting in config_inc.php by having the following line: This gave exactly the same result. I have tried both within the init routine and hook routine, again same result. | ||||
Tags | No tags attached. | ||||
Still have this issue. |
|
Can this issue be acknowledged as indeed to be an issue or am I overseeing something here? |
|
Since there is no real feedback on this issue, i found a way around. To me it seems that we need a special routine that can read such plugin settings without authenticating the users. |
|
Any feedback on this issue? |
|
Hi @cas I just noticed today this old issue that never got any response, sorry about that. I'm not sure that the problem still exists - as far as I can tell, calling plugin_config_get() when initializing a plugin does not result in an error (tested with 2.26.2). Please confirm. As a side note, I am not sure why you are using plugin_event_hook() and where you call it. This is normally an internal plugin API function, there should be no need for a plugin to call it directly. The normal way for a plugin to hook events, is to overload the MantisPlugin::hooks() methods, that just returns an array of events to hook, with event name as key and callback function as value, e.g. |
|
Issue can be closed, already solved this in the correct way. |
|