Hi and thanks again for all of your hard work. I may or may not have found a bug.
I have been using the 2.x-dev release from October 3rd (Commit #270802) and built a fairly complex view around it. When I moved the latest dev code in tonight, my view stopped working. The SQL statements specifically changed - see below.
Have a look at the following lines in the first 10/3 code:
INNER JOIN activity_targets activity_targets ON activity.aid = activity_targets.aid AND activity_targets.uid = 0
INNER JOIN activity_messages activity_messages ON activity_targets.amid = activity_messages.amid
LEFT JOIN activity_targets activity_personal_targets ON activity.aid = activity_personal_targets.aid AND activity_personal_targets.uid = ***CURRENT_USER***
In the current dev release, we get this:
INNER JOIN activity_targets activity_targets ON activity.aid = activity_targets.aid AND (activity_targets.uid = 0 AND activity_targets.language = '***ACTIVITY_LANGUAGE***')
INNER JOIN activity_messages activity_messages ON activity_targets.amid = activity_messages.amid
LEFT JOIN activity_targets activity_personal_targets ON activity.aid = activity_personal_targets.aid AND (activity_personal_targets.uid = ***CURRENT_USER*** AND activity_personal_targets.language = '***ACTIVITY_LANGUAGE***')
Now, I fully admit to a lack of strong SQL knowledge, but I am guessing this has to do with the ACTIVITY_LANGUAGE change, since that came in the 10/4 change and is the only recent modification that seems to be related. It may be important to point out that my site is not capturing language preferences from the users and I do not have the i18n module enabled.
So my question is this - should the views code for languages be wrapped in a check to see if the i18n module is enabled or if $language is available? Or do you think something else may be goofing me up?
Thanks in advance.
Comments
Comment #1
Scott Reynolds commentedEvery drupal site has a 'language' even if you don't turn anything on. Its part of Core.
Lots of functions like this in core: http://api.drupal.org/api/function/user_preferred_language/6 . Basically,
$language is always available.
You need to run the SQL outlined in that issue #493102-13: Provide a means for translating activity messages And update your message templates (admin/build/activity)
Comment #2
rjbrown99 commentedThank you, this fixed me 100%.
I changed the name of the issue title to better reflect this requirement.