I've tracked back two errors I was seeing in my logs to users who do not have relationships established viewing the Activity - User Relationships block. It looks like an empty array of ids is getting passed into activity_get_activity() and it isn't checking for an empty array before building the $wheres array and creating the sql statement from it.

Errors seen
implode() [function.implode]: Invalid arguments passed in [mysite]/modules/activity/activity.module on line 557.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY activity.created DESC LIMIT 0, 51' at line 3 query: SELECT activity.*, activity_targets.target_uid, activity_targets.target_role FROM activity_targets activity_targets INNER JOIN activity activity ON activity.aid = activity_targets.aid WHERE activity_targets.target_uid IN () ORDER BY activity.created DESC LIMIT 0, 51 in /var/www/defstar/sites/all/modules/activity/activity.module on line 625.

Comments

jaydub’s picture

If you are willing to try a dev snapshot this issue should be addressed in a change made a week or so ago

barrett’s picture

Thanks, jaydub. I'll test it out.

Is there a patch available that addresses this problem individually? I'd rather not jump to a full dev version if we can patch the problem in isolation.

jaydub’s picture

There will be another point release shortly to get out some of the fixes in the -dev branch. Watch for a release in the next few days.

sirkitree’s picture

Issue tags: +activity-6.x-1-2

Tagging to be dealt with in next point release.

sirkitree’s picture

Status: Active » Closed (duplicate)

Actually this is a duplicate of #413076: Installation warning for UR if no relationship defined

Marking as such as updating that one instead.

Estrangheros’s picture

Dear Community,

I'm afraid, I will need your help again :-S!

After fixing all pending issues on my site with your great help, I still experience this issue, related to user_relationship. Since more than a week now, I'm trying very hard to solve that issue; deleted it, and pasted it again, I checked the lines, where the issue occur over and over, but the issue still persists. Please, could one of you smart guys give me a hand on it? That would be awsome! The error message is the follow:

* warning: include_once(modules/user_relationships/templates/user_relationships_ui.templates.inc) [function.include-once]: failed to open stream: No such file or directory in /mySite/includes/theme.inc on line 286.
* warning: include_once() [function.include]: Failed opening 'modules/user_relationships/templates/user_relationships_ui.templates.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/mySite/modules/activitystream/PEAR') in /mySite/includes/theme.inc on line 286.
* warning: include_once(modules/user_relationships/templates/user_relationships_ui.templates.inc) [function.include-once]: failed to open stream: No such file or directory in /mySite/includes/theme.inc on line 286.
* warning: include_once() [function.include]: Failed opening 'modules/user_relationships/templates/user_relationships_ui.templates.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/latincof/public_html/modules/activitystream/PEAR') in /home/latincof/public_html/includes/theme.inc on line 286.
* warning: include_once(modules/user_relationships/templates/user_relationship_blocks.templates.inc) [function.include-once]: failed to open stream: No such file or directory in /mySite/includes/theme.inc on line 286.
* warning: include_once() [function.include]: Failed opening 'modules/user_relationships/templates/user_relationship_blocks.templates.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/mySite/modules/activitystream/PEAR') in /home/latincof/public_html/includes/theme.inc on line 286.
* warning: include_once(modules/user_relationships/templates/user_relationship_blocks.templates.inc) [function.include-once]: failed to open stream: No such file or directory in /mySite/includes/theme.inc on line 286.
* warning: include_once() [function.include]: Failed opening 'modules/user_relationships/templates/user_relationship_blocks.templates.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/mySite/modules/activitystream/PEAR') in /home/latincof/public_html/includes/theme.inc on line 286.
* warning: include_once(modules/user_relationships/templates/user_relationship_blocks.templates.inc) [function.include-once]: failed to open stream: No such file or directory in /mySite/includes/theme.inc on line 286.
* warning: include_once() [function.include]: Failed opening 'modules/user_relationships/templates/user_relationship_blocks.templates.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/mySite/modules/activitystream/PEAR') in /mySite/includes/theme.inc on line 286.

sirkitree’s picture

@Estrangheros

I believe you're getting Activity module and ActivityStream module confused. The module referenced in your error looks to be from ActivityStream, not Activity. Please report there.