In Open Atrium 2 we have had a situation with backwards compatibility where a message_type text fragment is updated to use a new hardcoded token like @{message:user:name}. However, existing messages in the database were not saved with this new fragment, so they don't have the token. Thus, views like Recent Activity end up showing the new @{message:user:name} text in all of the older messages.

We desire a patch that replaces any un-resolved hardcoded tokens with normal "live" tokens. For example, replacing @{message:user:name} with [message:user:name] for older messages that didn't have the hardcoded token. While the data displayed for the old message is not necessarily correct, it's a better way to handle a bad situation than just removing the token or showing the @{...} text itself.

Patch forthcoming...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mpotter’s picture

Status: Active » Needs review
FileSize
905 bytes

Might be a better way to do this, but here is a patch to start with. Might want to add some options for controlling this at some point.

Status: Needs review » Needs work

The last submitted patch, message-token_replace-2046591-1.patch, failed testing.

amitaibu’s picture

FileSize
133.95 KB
  • The current token handling should be changed to a select list, with another option -- replace hardcoded token with dynamic token
  • Add test <-- sorry about that, but we want to make sure it's always working properly ;)
bluegeek9’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)