Hello there, this is my first time reporting an issue so I apologize in advance if I have done something wrong in my reporting of these errors. Anyway here are the links to the specific lines in class.plugin.php that are not working or able to be executed from within a plugin:
- https://github.com/osTicket/osTicket/blob/1.18.x/include/class.plugin.php#L894
- https://github.com/osTicket/osTicket/blob/1.18.x/include/class.plugin.php#L879
The pre_uninstall and uninstall function are not working when trying to be executed from my plugin's class, for reference this how I call upon the function in my plugin:
function pre_uninstall(&$errors) {
\\ A statement that is executed.
return parent::pre_uninstall($errors);
}
And for uninstall I would just put uninstall
in place of pre_uninstall
. If I have trying to use the function in a wrong way please provide me the correct use for this function. I would like to bring to attention how the function is only being executed when a plugin is installed but not when a plugin is disabled and re-enabled. Also global $ost
is returning null when trying to be accessed by a plugin function, but when accessed in the enable function it works fine, so I have to create my own instance of ost in my plugin to be able to use it for logging errors in the ost system log. I would also like to note that some core plugins are using these functions too, but I am not sure if the functions work in them or not as I have not tested those core plugins. I would also like to note that I have opened an issue regarding this on GitHub which you can find here https://github.com/osTicket/osTicket/issues/6594