I am trying to get FileUpload extras working with FileSluggy extra for sanitizing file names after upload. However after upload I am receiving the following php error:
PHP message: PHP Fatal error: Uncaught Error: Call to a member function get() on null in /modx/core/cache/config/includes/elements/modplugin/5.include.cache.php:62
Which is referring to this line:
if ($FileSluggy->santizeAllowThisMediaSource($source->get('id'))) {
Reason for this is that in FileUpload's invokeEvent method no $source is passed to OnFileManagerUpload event.
In order to make FileUpload work with other file uploading/sanitizing extras we should consider adding all default event parameters to the invokeEvent method:
https://docs.modx.com/revolution/2.x/developing-in-modx/basic-development/plugins/system-events/onfilemanagerupload