Hi,
I appreciate the work that has been done to make activity recording templates cool and easy, especially the token itegration. But I see that once an activity is recorded, it becomes hardcoded in the database which means tokens will not be available when rendering the activity. Here is an example: John creates an album "Miky and me snowboarding" and after saving the node he just remembers that his friend does not like to be called "Miky". He edits the title and updates the node. It is ok now, but the activity stream still shows "Miky and me snowboarding".
Is there a way to render activities dynamically by not replacing tokens until activity rendering ? It surely may cause some extra processing but since activity module is fully integrated with views, views cache is an option.
Thanks.
Comments
Comment #1
Scott Reynolds commentedThis has been decided that it will not work this way. For ONE comment activity, it would need to load the Comment, the Node and the User. If you listed 20 comment Activities this gets out of hand.
And there would need to be an api in place that defines what objects get loaded. This would become mightily complex because you would have to deal with the deletion of all the objects used to generate the message. The bookkeeping alone becomes unwieldy.
You forget that Activity is very personalized, so what one user sees is never the same as what the other user sees, so caching is almost a no win. The Views cache works on what the actual built SQL is. And each built SQL would be different for each user if you used the Activity Access: User Context argument. Thus, creating a cache record per user per View. edit:Its actually worse then that. Its cached per User Context, per View per GLOBAL['user'] per language.
I hope though, that with work on this #529318: Generate activity on an existing site + reset activities option. some Activities can be regenerated. This means that a module watching node updates could force an Activity to be regenerated with the new information.