?
avatar dgrammatiko
dgrammatiko
29 Apr 2020

Steps to reproduce the issue

This might NOT be an actual bug!!!

As I was playing around with J4 I found that the content type plugins will not be triggered on the respected events (given that the context was correct. Moving the plugins to system type things working as expected, or kinda as the onContentBeforeSave seems to always be skipped.

The question here: is it expected behaviour a onContent[Before/After]Save to be of a system type instead of the logical (at least for me) content?

Also can someone confirm that the events are triggered as expected?

avatar dgrammatiko dgrammatiko - open - 29 Apr 2020
avatar joomla-cms-bot joomla-cms-bot - change - 29 Apr 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 29 Apr 2020
avatar SharkyKZ
SharkyKZ - comment - 29 Apr 2020

Looks like only media-action plugin group is used:

// Also include the filesystem plugins, perhaps they support batch processing too
PluginHelper::importPlugin('media-action');
$result = $app->triggerEvent('onContentBeforeSave', ['com_media.' . $object->type, $object, true]);

If plugins should be compatible with both J3 and J4, this needs to be changed.

avatar dgrammatiko
dgrammatiko - comment - 29 Apr 2020

Looks like only media-action plugin group is used

I've tried that as well without any success

avatar SharkyKZ
SharkyKZ - comment - 30 Apr 2020

Seems to work for me but not sure how to display messages correctly. Aborting upload always shows generic Internal Server Error message.

avatar dgrammatiko
dgrammatiko - comment - 30 Apr 2020

@SharkyKZ I just created a PR: #28886

avatar dgrammatiko dgrammatiko - change - 30 Apr 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-04-30 15:01:16
Closed_By dgrammatiko
avatar dgrammatiko dgrammatiko - close - 30 Apr 2020

Add a Comment

Login with GitHub to post a comment