Posted by ezra-g on November 7, 2012 at 11:02pm
6 followers
Jump to:
| Project: | Drupal Commons |
| Version: | 7.x-3.x-dev |
| Component: | Email Notifications |
| Category: | feature request |
| Priority: | critical |
| Assigned: | ezra-g |
| Status: | closed (fixed) |
Issue Summary
- 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
#1
#2
A 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.
#3
Progress 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.
#4
Maybe 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.
#5
Hi Dave! For an example, see #1784854: Specific Activity stream & email update text for Questions & Answers.
#6
And, I'm currently working with this text for the message body:
#7
Is it a multiple entity-reference field? So does any of the referenced node tokens work or none?
#8
@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
<?phpentity_get_controller('node')->resetCache(array($node->nid));
?>
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... .
#9
These 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.
#10
Automatically closed -- issue fixed for 2 weeks with no activity.