Closed (works as designed)
Project:
Activity
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2009 at 19:14 UTC
Updated:
28 Sep 2009 at 19:18 UTC
In activity2 the tokens are replaced before the message is written to the database. This leads to dead links if their href doesn't exist anymore, e.g. if the corresponding path alias is changed. I suggest to save the used tokens as well as their values to an extra field in the database table and replace them when the view is rendered. This way links always use the right path.
What do you think?
Comments
Comment #1
Scott Reynolds commentedThis has been discussed to death. Replacing tokens when rendering them is slow, as you have to pull an serialized array out of the database and then unserialize it. Furthermore, the serialized array will not have a clue on what it needs to hold (ie does it need $node->nid, $node->title, $user->name), so then it would have to serialize and unserialize ALL OBJECTS used in the token replacement (in some cases that is 5 objects, and we all know that the node object gets rather large).
Unless you have a solution, marking as by design.