superfluous email notifications being sent out by videolist? (issue with view counters / ajax likes)

for a long while i have been receiving spurious emails from my site about videos held by videolist (elgg 1.8.18 version) when they should not be sent out.

i discovered that both of the view counter plugins (coldtrick's - https://github.com/ColdTrick/entity_view_counter and also matt's - http://community.elgg.org/plugins/872625/1.1/views-counter-18x) were triggering the messages every time the video was viewed. so i have disabled them for now.

i looked through the code briefly and got feedback from the coders - they pointed me back to videolist and i didn't see any obvious causes in the code for the view counter plugins.

today i just enabled etlikes (http://community.elgg.org/plugins/1161358/1.1/easytalkee-ajax-likes - ajax likes) plugin and the same issue occurred again when i liked a video in the river. (actually i didn't receive the notification but i immediately got an 'email undeliberable' notification from another user's hotmail account that had been sent a notification that i liked this video - even though there was no proper reason for that mail to be sent out.

so.. there is some type of bug somewhere either in core or in videolist that is triggering emails incorrectly (or possibly in some other notification plugin i am using).

does anyone have any thoughts on the cause of this?

coldtrick advised me to use this version of videolist to test: https://github.com/Pleio/videolist

i haven't done that yet and do not know what the possible fix is that may be in it.

thanks

  • only the brief text and link -

    a new video

    a new video: https://video_url


  • i do not have any of those hype plugins on my live site - which is where i am seeing the issue.. are you only seeing videolist notifications going out?

  • i meant to ask 'are you receiving notifications from your site which are superfluous and are not from videolist'?
    i am seeking to know if the issue is purely related to videolist or not.

  • hypewall does not support videolist currently, so possibly your issue is with hypewall - or maybe there is a core bug.

    i haven't looked at the notification code at all, ever.. so i don't have anything to contribute currently.

  • I am using view counter from Matt and the ajax likes plugin, but not videolist. I have no issue with superfluous email notifications.

  • ok, thanks gerard - so i will look at videolist then, when the opportunity arises.

  • ok thanks for the info.

    i see this in videolist (start.php) - looks like this is the area of code that needs to be examined:

    elgg_register_event_handler('annotate','all','videolist_object_notifications');

    elgg_register_plugin_hook_handler('object:notifications','object','videolist_object_notifications_intercept');

     

    /**
    * Event handler for videolist
    *
    * @param string $event
    * @param string $object_type
    * @param ElggObject $object
    */
    function videolist_object_notifications($event, $object_type, $object) {
    static $flag;
    if (!isset($flag)) {
    $flag = 0;
    }

    if (is_callable('object_notifications')) {
    if ($object instanceof ElggObject) {
    if ($object->getSubtype() == 'videolist_item') {
    if ($flag == 0) {
    $flag = 1;
    object_notifications($event, $object_type, $object);
    }
    }
    }
    }
    }

    /**
    * Intercepts the notification on an event of new video being created and prevents a notification from going out
    * (because one will be sent on the annotation)
    *
    * @param string $hook
    * @param string $entity_type
    * @param array $returnvalue
    * @param array $params
    * @return bool
    */
    function videolist_object_notifications_intercept($hook, $entity_type, $returnvalue, $params) {
    if (isset($params)) {
    if ($params['event'] == 'create' && $params['object'] instanceof ElggObject) {
    if ($params['object']->getSubtype() == 'videolist_item') {
    return true;
    }
    }
    }
    return null;
    }

  • so the code is intended - as i read it - to send a 'new video is created' notification when two event handlers are processed, where:

    1. the first handler identifies that an annotation is added to any videolist_item

    2. the second handler identifies the event as a 'create video' event, specifically.

    (i don't know why this code is necessary, currently.)

    in any case, what appears to be occuring is that the 2nd handler is detecting an 'annotation created' event instead of a 'video created' event.

     

    so now i will look to find why any of this code is in here at all!

  • videolist has been quoted differently to other plugins, such as bookmarks and blogs. i have no idea at all why these event handler are present. i will disable them and see what occurs!