Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
- Default message types
- Business logic to create new messages for sending
- Default views for the message subscribe UI
- Alter the message subscribe UI menu link name
- Link to the notification settings form from the search box
Comments
Comment #1
erikwebb CreditAttribution: erikwebb commentedComment #2
ezra-g CreditAttribution: ezra-g commentedA first round of the UI is now in place: http://drupalcode.org/project/commons_follow.git/commit/dca7174
Next: revisions to the UI and actually creating and sending emails.
Comment #3
ezra-g CreditAttribution: ezra-g commentedProgress on this continues in the message-subscribe-refactor branch of commons_notify.
However, I'm running into some issues with token replacement on some of the entity reference fields.
Specifically, these tokens are replaced successfully:
[message:field-target-nodes:0:content-type]
However, I'm not able to get the referenced node body to be replaced successfully. For good measure, I've tried some variations:
There are several potentially relevant issues related to Entity API and Token:
#1487990: Token not working for Entity reference field (multiple values) - Has at least 1 duplicate.
#1272560: Entity tokens duplicates field tokens created by token module
#691078: Field tokens
At this point, it would be great to get some input from folks who are more familiar with the current state of Entity/Token integration.
Comment #4
Dave ReidMaybe it would help me to see what is the output result you are looking for in terms of tokens? I need to see the larger context of the desired string.
Comment #5
ezra-g CreditAttribution: ezra-g commentedHi Dave! For an example, see #1784854: Specific Activity stream & email update text for Questions & Answers.
Comment #6
ezra-g CreditAttribution: ezra-g commentedAnd, I'm currently working with this text for the message body:
Comment #7
fagoIs it a multiple entity-reference field? So does any of the referenced node tokens work or none?
Comment #8
ezra-g CreditAttribution: ezra-g commented@fago and @Dave Reid - Thanks for weighing in here!
It is a multiple value entity reference field. The behavior I was seeing was that the title and node type appeared to be replaced successfully, but not the body.
The message was being sent for token replacement in a hook_node_insert() implementation --
I added a
and now the title is successfully replaced.
You can see this in context at http://drupalcode.org/project/commons_notify.git/blob/refs/heads/7.x-3.x... .
Comment #9
ezra-g CreditAttribution: ezra-g commentedThese are now in place in Commons_notify, with the most up-to-date nightly snapshot.
Followup issues:
#1784854: Specific Activity stream & email update text for Questions & Answers
#1853326: Unable to subscribe to email updates from group subscriptions separately from default status.