Closed (outdated)
Project:
Radioactivity
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 Jan 2012 at 07:40 UTC
Updated:
4 Feb 2025 at 21:12 UTC
Jump to comment: Most recent
When a radioactivity field is initialized in a single language environment, it gets the language "und" in the database.
However, if the radioactivity field is intended to be modified with a rule, the rule assumes a language, in my case "en". This results in a duplicated row in views, but with the "und" energy value used exclusively.
To fix this, I changed a single variable in radioactivity.module in the _radioactivity_update_energy function. I changed 'language' => $language to 'language' => 'und'.
Seeing as how it's numeric, I don't see why it would need to be translatable since translated nodes have a separate set of fields.
Comments
Comment #1
tcmug commentedAre you using the latest dev version?
The language should actually be 'und' (LANGUAGE_NONE) when the field content is not translatable:
radioactivity.rules.inc ln 49:
I encountered similiar bug AFTER I had disabled content translation related modules; this left some of the content in a confused state in which point the above code failed.
Comment #2
neomenlo commentedI have never enabled any translation modules in this installation.
I was using a votingapi rules module. I am not familiar with all the data sent through rules, but perhaps the trigger is responsible, and not the action.
However, since radioactivity is a numeric field, should it really be translatable at all? Why not just set $lang to LANGUAGE_NONE always?
Comment #3
tcmug commentedI cant figure out how to reproduce this - but I'll leave this open and do some more tests when I have time.
The field is translatable because I don't want to force it not to be translatable - it should be up to the sites owner to decide (sites with multiple languages might need per language listings of popularity for instance).
Comment #4
tr commented