I use radioactivity 7.x-1.x with Memcache storage plugin. I have a Radioactivity field on a node type, that gets 1 unit of energy on every page load. Energy is emmited with javascript.
Radioactivity field on node is unstranslatable ('und' appears in it's structure in node object). I'm not sure, if this field is meant to be translatable, but code that configures emitter in radioactivity_field_formatter_view() assumes so. At the end this reflects in two rows in field table for each node:
- first line, the one created at node save, is maked as 'undefined' language
- seconds line, the one created by _radioactivity_update_energy(), has the same language as node
If you go to node edit form you always get value from frst row, which value is never increased.
Attached patch fixes this. It introduces a bit more flexible approach of language selection in radioactivity_field_formatter_view(), which should work OK if field is saved as translatable or not.
| Comment | File | Size | Author |
|---|---|---|---|
| radioactivity_field_language_issue.patch | 583 bytes | slashrsm |
Comments
Comment #1
paranojik commentedTested and works OK. Please commit this ASAP.
Comment #2
tcmug commentedThanks guys!
I'm dropping this back go "needs review": I've commited a new version which includes quite alot of changes to the field translation handling with e.g. entity_translation module.
Also regarding the patch:
Assumes that we're only dealing with nodes, so I addressed that also.
Comment #3
paranojik commentedThis appears to be fixed in the latest stable release.
Comment #4
tcmug commentedExcellent :)