Download & Extend

Data inconsistency in email messages

Project:RSVP
Version:6.x-2.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

While working on #1035746: Add guest response fields to mailer replacement strings for a client that wanted to add the visitor's RSVP response to messages, it was identified that the data stored in $invite_target is different for different use cases during the same execution cycle.

Scenario:

  • User A creates an event, invites User B.
  • User B responses to the invitation, the response changes from "none" to "yes".
  • The email that goes to user A contains the following structure for $invite_target:
    response (String, 3 characters ) yes
  • For the message that goes to the maintainer, the following $invite_target structure is passed:
    response (String, 4 characters ) none
  • The data was provided by add dpm($invite_target) to rsvp.mailer.inc just before the return statement.
  • Also, the output is displayed in the order above, i.e. the email to the visitor is sent before the email to the event creator.

Comments

#1

Status:active» needs review

This patch changes the following line in rsvp_reply_form_submit() (rsvp.module) so that both of the email functions execute the same data, i.e. it changes from:

<?php
  $invite_target
= $form_state['values']['invite_target'];
?>

to:
<?php
  $invite_target
= rsvp_function_load_invitation_hash($form_state['values']['invite_target']->hash);
?>
AttachmentSize
rsvp-n1038730.patch 753 bytes

#2

Updated patch that provides the old response data in $invite_target->old_response.

AttachmentSize
rsvp-n1038730-2.patch 827 bytes

#3

Ignore this, patch uploaded to the wrong ticket.

AttachmentSize
rsvp-n1035746-8.patch 6.86 KB