0

I'm trying to get MX Notify Control setup to handle new entry and updated entry notifications for an event registration channel I created. Currently the notifications are working for 10 of the 11 notifications, however there is one custom status that often sends data from a different entry than the one been updated to this problematic status. It should be noted that the same issue occurs when attempting to setup the notification with my Postmaster module as well.

Below is an example of the code I'm using for the e-mail template for this notification that always sends the wrong data or better described it will send the data for the first entry in the channel with the 'Hours-Confirmed' status which is usually not the correct one or the one being updated. I will also mention that the template below doesn't seem to be the issue though as the same problem happens if you update an entry to the 'Hours-Confirmed' status from the control panel.

<h3>Event Hours Confirmed</h3>
{exp:channel:entries channel="vip_event_registration" status="Hours-Confirmed" limit="1"}
<p>Your hours have now been confirmed for {vip_event}. According to our records, you attended this event for {vip_hours_total} hours.  Thank you for participating in a VIP event!</p>                                          
{/exp:channel:entries}      

The code above e-mails the incorrect data when an older entry is updated to the 'Hours-Confirmed' status as it always sends the data for the first entry with the 'Hours-Confirmed' status starting from the most recent entries.

On the front-end template I'm using a search parameter for my Safecracker status update form like this, search:entry_id="{segment_3}" and I have it setup so the correct entry_id is always in segment_3 of the URL. I need to also create that association for the e-mail notification so it will send the correct data but not exactly sure how to go about that. In fact I thought that functionality was or should be built-in to both MX Notify Control and Postmaster but it doesn't work in either for this one status. My only ideas at this point are to keep the 10 working notifications and setup a custom PHP script for the 11th one that's causing all these problems with incorrect data being sent.

Another interesting point to note is that if I go to the control panel and look at an older entry, not change anything but just submit it again, then I'll get an e-mail notification with the data from the most recent entry with the 'Hours-Confirmed' status.

The same is also true for the Postmaster module. It's strange that 10 of the 11 e-mail notifications are now working with MX Notify Control but there is one status that sends incorrect data in both MX Notify Control and Postmaster.

Any tips or suggestions to help resolve this issue with the incorrect entry data being sent would be greatly appreciated, thanks!

1

MX Notify Control requires that you manually specify the entry_id for any channel:entries tags:

<h3>Event Hours Confirmed</h3>
{exp:channel:entries channel="vip_event_registration" status="Hours-Confirmed" limit="1" entry_id="{entry_id}"}
<p>Your hours have now been confirmed for {vip_event}. According to our records, you attended this event for {vip_hours_total} hours.  Thank you for participating in a VIP event!</p>                                          
{/exp:channel:entries} 

Using Postmaster, you need to similarly use entry_id={parcel:entry_id}.

1
  • Thanks for your comments Derek! You were absolutely right and thank you very much for the help. This had been driving me crazy. It's working perfectly either updating statuses from front-end templates or the control panel, correct e-mails are being sent! – Andrew Currie Mar 12 '15 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.