River event

Hello.

I'm trying to make the plugin hook [event: created, river] for Elgg 3:

elgg_register_event_handler('created', 'river', function (\Elgg\Event $event) {

      $item = $event->getObject();

      if ($item instanceof \ElggRiverItem) {

            elgg_log('test', 'ERROR');

     }

});
 
But this hook doesn't work.
 
I've enabled the error log and read the documentation http://learn.elgg.org/en/3.x/guides/events-list.html#river-events
 
I've also tested this in the Elgg core directly on https://github.com/Elgg/Elgg/blob/3.3/engine/lib/river.php#L303
 
But it seems to be not working either.
Has anyone been able to successfully use this hook?
 
Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking