? ?
avatar frthjf
frthjf
15 Jun 2016

Steps to reproduce the issue

  1. Go to the Joomla Backend > Users and run a Batch process for the selected users, e.g. 'Add To Group'.
  2. Try to catch upon the event onUserBeforeSave or onUserAfterSaveGroup in a Plugin.

Expected result

The Plugin function should be triggered.

Actual result

No Plugin event is triggered to catch the batch process.

System information (as much as possible)

PHP Version 5.6.22-1+donate.sury.org~trusty+1
Web Server Apache/2.4.20 (Ubuntu)
WebServer to PHP Interface fpm-fcgi
Joomla! Version Joomla! 3.5.1 Stable [ Unicorn ] 05-April-2016 22:45 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

Additional comments

I don't know whether there is an efficient way to implement that for large user sets. However, in my use case I need to sync any changes made to the user groups to another application and currently I can't catch up on batch processes in the backend.

avatar dudheit dudheit - open - 15 Jun 2016
avatar brianteeman brianteeman - change - 15 Jun 2016
Category Plugins
avatar brianteeman brianteeman - change - 16 Jun 2016
Labels Added: ?
avatar laoneo
laoneo - comment - 21 Jun 2016

This is valid for all batch actions like Articles or Contacts as the model batch function doesn't trigger any kind of event.

avatar dudheit
dudheit - comment - 21 Jun 2016

Is this for some reason intended?

avatar laoneo
laoneo - comment - 21 Jun 2016

I don't think so. I guess it was not implemented as it was not needed till now. The function where the events should be triggered, can be found on that file https://github.com/joomla/joomla-cms/blob/staging/libraries/legacy/model/admin.php#L186. The only thing we have to define here, are the parameters and event names. The implementation should be relatively simple.

avatar dudheit
dudheit - comment - 21 Jun 2016

Ok, I'd suggest to trigger the existing events onUserBeforeSave etc., multiple times though.

avatar laoneo
laoneo - comment - 21 Jun 2016

I would go with batch triggers.

avatar dudheit
dudheit - comment - 21 Jun 2016

Than the plugin developer has to listen for the batch explicitly. Seems not to be a big deal, if the documentation is clear about that. What API would you propose than? onBatchUserBeforeSave etc.?

avatar joomla-cms-bot joomla-cms-bot - change - 21 Jun 2016
The description was changed
avatar joomla-cms-bot joomla-cms-bot - edited - 21 Jun 2016
avatar laoneo
laoneo - comment - 21 Jun 2016

For example the content events do deliver a context which is available in the batch action as well. So I would go with something more generic like onBatchBeforeSave and onBatchAfterSave.

avatar franz-wohlkoenig franz-wohlkoenig - change - 6 Apr 2017
Priority Medium Low
Status New Needs Review
avatar mbabker mbabker - change - 6 Apr 2017
Labels Added: ?
avatar mbabker mbabker - labeled - 6 Apr 2017
avatar mbabker
mbabker - comment - 25 May 2017

We should have batch events. Added the new feature label, this is something anyone who is interested could work on and open a PR for at any point I feel.

avatar franz-wohlkoenig franz-wohlkoenig - change - 25 May 2017
Status Needs Review Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 May 2017
Category Plugins Feature Request Plugins
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar brianteeman brianteeman - unlabeled - 21 Jul 2018
avatar wilsonge
wilsonge - comment - 19 Aug 2018

Closing this as we have a PR with #20213

avatar wilsonge wilsonge - change - 19 Aug 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-08-19 10:15:26
Closed_By wilsonge
avatar wilsonge wilsonge - close - 19 Aug 2018

Add a Comment

Login with GitHub to post a comment