Hi,
i have this problem in the default Stream view in Aquia Commons distribution.
After installing and configuring Radioactivity for "act_log" (all values to 1 energy point for a test) i've modified the view with radioactivity sorting criteria: with desc, inner JOIN . (the problem i also in left join).

This is the query that views execute: no result.

SELECT activity_log_messages.mid AS mid,
   activity_log_templates.tid AS activity_log_templates_tid,
   activity_log_messages.aids AS activity_log_messages_aids,
   activity_log_messages.created AS activity_log_messages_created,
   activity_log_messages.last_updated AS activity_log_messages_last_updated,
   activity_log_messages.stream_owner_id AS activity_log_messages_stream_owner_id,
   activity_log_messages.stream_owner_type AS activity_log_messages_stream_owner_type,
   activity_log_messages.viewer_id AS activity_log_messages_viewer_id,
   activity_log_messages.target_id AS activity_log_messages_target_id,
   activity_log_messages.target_type AS activity_log_messages_target_type,
   activity_log_messages.acting_uid AS activity_log_messages_acting_uid,
   activity_log_messages.cached AS activity_log_messages_cached,
   activity_log_templates.rule AS activity_log_templates_rule,
   activity_log_templates.action_label AS activity_log_templates_action_label,
   activity_log_templates.template AS activity_log_templates_template,
   activity_log_templates.group_template AS activity_log_templates_group_template,
   activity_log_templates.group_summary AS activity_log_templates_group_summary,
   activity_log_templates.collapse_method AS activity_log_templates_collapse_method,
   activity_log_templates.pid AS activity_log_templates_pid,
   activity_log_templates.eval_input AS activity_log_templates_eval_input,
   activity_log_templates.resources AS activity_log_templates_resources,
   activity_log_templates.cacheable AS activity_log_templates_cacheable,
   activity_log_templates.display_type AS activity_log_templates_display_type,
   radioactivity.energy AS radioactivity_energy
 FROM activity_log_messages activity_log_messages 
 LEFT JOIN activity_log_templates activity_log_templates ON activity_log_messages.tid = activity_log_templates.tid
 INNER JOIN radioactivity radioactivity ON activity_log_messages.nid = radioactivity.id AND (radioactivity.class = 'act_log' AND radioactivity.decay_profile = 1)
 WHERE (activity_log_templates.display_type = 'web') AND (activity_log_templates.pid NOT IN (SELECT pid FROM activity_log_disabled_types WHERE uid = 1)) AND (
      viewer_id = 0 OR
      viewer_id = 1 OR
      (viewer_id < 0 AND viewer_id <> -1)
    )
   ORDER BY radioactivity_energy DESC

But this query is wrong no activity_log_messages.nid exist. In fact executing the same query via phpmyadmin and replacing activity_log_messages.nid with activity_log_messages.mid it return the right results.

This is a complete views error on a fresh drupal (not pressflow) installation:

user warning: Unknown column 'activity_log_messages.nid' in 'on clause' query: SELECT COUNT(*) FROM (SELECT activity_log_messages.mid AS mid FROM activity_log_messages activity_log_messages LEFT JOIN activity_log_templates activity_log_templates ON activity_log_messages.tid = activity_log_templates.tid INNER JOIN radioactivity radioactivity ON activity_log_messages.nid = radioactivity.id AND (radioactivity.class = 'act_log' AND radioactivity.decay_profile = 1) WHERE (activity_log_templates.display_type = 'web') AND (activity_log_templates.pid NOT IN (SELECT pid FROM activity_log_disabled_types WHERE uid = 1)) AND ( viewer_id = 0 OR viewer_id = 1 OR (viewer_id < 0 AND viewer_id <> -1) ) ) count_alias in C:xampphtdocsstddrupalsitesallmodulesviewsincludesview.inc on line 790.

Thank you for help :-)

m

CommentFileSizeAuthor
activity_log_stream_global.txt5.7 KBmarkoz

Comments

icecreamyou’s picture

Unfortunately I've found myself unusually busy this week. I may be able to take a look next week but if not then it could be another 2-3 weeks after that. Of course patches are welcome.

js’s picture

I have the same issue, or so it seems. It is strange that others are not also experiencing it. Either I (we) have done something wrong, or possibly very few people are using the latest Commons.

@Markoz have you patched your installation? If so, can you share what and where?

Thanks!

js’s picture

This patch may have worked for me

http://drupalcode.org/project/activity_log.git/commitdiff/b3b19cd?hp=310...

I have misplaced the thread this came from.

icecreamyou’s picture

Status: Active » Postponed (maintainer needs more info)

Can anyone confirm that the development release still has this issue?

markoz’s picture

Sorry, i left Acquia Commons for the internationalization issues with activity and other core modules.

icecreamyou’s picture

Version: 6.x-2.0-beta1 » 6.x-2.x-dev
Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

added views sql error report