Activity Rivers Display Problems

Greetings to all!

My rivers do not display properly. I notice a few other users are having the same problems. The problem seems to center on the "Number of Entries to Display" which does not correspond to entries shown (at least not for me). "5" will sometimes show one or two entries and "8" maybe 6, etc. When I try to "edit," it will often cause the box to blank until a new entry is created. I would appreciate some support on this, if possible. I know this has been an ongoing issue for many people, but it doesn't seem to be getting the attention it deserves. I believe the problem is being caused by the Messageboard plugin, but I can't be sure. I think this was mentioned before. If anyone has any advice for me, it would be most appreciated. Thanks!

  • I've been working on fixing a lot of bugs in Elgg 1.1 and this one is next on my list. I've been posting my fixes here: http://community.elgg.org/pg/pages/view/9652/

    If you have some time to look through engine/lib/river.php, try to work out the functionality of get_river_entries() and its sub-functions. I'm assuming the problem must be in there. I have noticed that the problem goes away depending on what plugins are enabled as you said.

  • Thank you, Cash. It's been an extremely frustrating problem. The rivers are critical to the site. You seem to be the only one who has identified the issue and is trying to do something about it. It's very much appreciated. I look forward to seeing what you come up with.

  • The problem is :

    if you set 'entries per page', elgg will do an SQL-Query with a limit.

    SELECT blabla FROM blabla LIMIT 10

     

    But not for all river-events there are display-modules. 

    If you have 10 records, but only 6 modules for displaying, river will only display 6 entries.

     

    I think we must have an own counter at the river function und increase the limit-statement to 'number-of-entires * 2'.

  • On my site at least the problem is object->widget->[widget name]->create

    The SQL query in the river looks for things matching this pattern:

      sl.object_type='object' and   sl.object_subtype='widget' and 
    sl.event='create' and ...

    This will include a user adding any widget regardless of whether it has a river view. The same goes for "update" (like the messageboard). The system log doesn't have enough fields to filter based on widget name. The no coding method for fixing this is removing the create.php and update.php for all plugins (messageboard is the only core plugin that has these). This does not include blogs, bookmarks, and files since they are not widgets in the elgg database. My own opinion is that no one cares when someone adds a widget or updates its properties so pull those out. You could go the other way and add create.php and update.php for each widget.

    To fix this with code would involve doing something like Ralf recommends. Either pull out twice as many as you need and hope that is enough once the non-river ones are filtered or continue pulling until you reach the limit.


  • Brilliant!! Well done, sir. Thank you. Now by removing create and update only from the messageboard, it completely fixes the problem in the user activity river, but the "Friend's activity" river hangs up and won't display. Any idea why?

    I'd like to keep the create and update for the youtube and flikr plugins, so I guess the solution is to add the files to every plugin

  • So replacing the files in the messageboard doesn't resolve the problem. I get the ajax loader, but no entries. Disabling the messageboard completely, however, does the trick.  I assume that once some friends create new entries some will appear, but in the meantime this is where i am.

  • It's working for me. Friends activity uses the same code as user activity so it should work for both. My best guess is that the user's friends had an event in the log that wasn't in the user's log query. When I said that you could add create.php and update.php to other widget plugins, you didn't just copy those over did you?

    Are there any errors in your http server error log related to this?

  • I was able to reproduce the problem (the ajax logo kept spinning). It happened when I had bad code in one of the create.php (or update.php) files.

  • Thanks, Cash. The strange thing is that when I put the files back in the messageboard, it didn't resolve the problem.

    I obviously didn't copy the the files over. :) Were you suggesting that every plugin needs those two files under object/river?