Closed (won't fix)
Project:
Make Meeting Scheduler
Version:
6.x-1.0
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Aug 2009 at 07:56 UTC
Updated:
14 May 2012 at 13:14 UTC
Hi,
When you send an email to someone it isn't displaying the full link to the poll.
This is a mystery to me because the email functionality renders the !poll_link correctly when you are using the feature to be notified of a vote. I've looked over the code and the two functions are structured the same. I even tried rewriting to use the same variables, but for some reason when you send the poll using the example.com/makemeeting/#######/sendfw it doesn't parse/render the poll link.
@line 710
// send to friends the poll link
case 'refer':
$variables = array(
'!site' => variable_get('site_name', 'Drupal'),
'!nickname' => $params['name'],
'!poll_owner' => $params['owner_name'],
'!poll_link' => url('makemeeting/' . $params['poll_url'], array("absolute" => true))
);
$message['subject'] = t('Event Schedule Response Requested on !site', $variables, $language->language);
$message['body'] =
t('Dear !nickname,
please follow the link below to answer the question of !poll_owner !poll_link
Greetings,
!site', $variables, $language->language);
break;
// send notify to poll owner
case 'new_vote':
$variables = array(
'!name' => $params['name'],
'!site' => variable_get('site_name', 'Drupal'),
'!poll_link' => url('makemeeting/' . $params['poll_url'], array("absolute" => true))
);
$message['subject'] = t('New vote on !site', $variables, $language->language);
$message['body'] =
t('Dear !name,
somebody voted on your poll!
Check it at the following link:
!poll_link', $variables, $language->language);
break;
Could it have something to do with this?
@line 1065
// send emails
for ($i=0; $i<5; $i++) {
if (!empty($form['#post']['sendfw']['address_' . $i])) {
$email = $form['#post']['sendfw']['address_' . $i];
drupal_mail('makemeeting', 'refer', $email, language_default(), $mail_params);
}
}
drupal_set_message(t("Mail sent."));
}
/**
* makemeeting_sendfw_form_validate()
*
* @return void
*/
function makemeeting_sendfw_form_validate($form_id, $form_values) {
for ($i=0; $i<5; $i++) {
if (!empty($form_values['values']['sendfw']['address_' . $i])) {
if (!valid_email_address($form_values['values']['sendfw']['address_' . $i])) {
form_set_error('sendfw[address_' . $i . ']', t('E-mail #@count is not valid', array("@count" => $i+1)));
}
}
}
}
Any help sorting this out would be greatly appreciated.
Thanks,
CarbonPig
Comments
Comment #1
lazyj commentedHi!
There is a simple fix to the problem. Just change the "value" to "hidden" in line ~1023
From this
$form['sendfw']['poll_url'] = array(
'#type' => 'value',
'#value' => $node->poll_url
);
to this
$form['sendfw']['poll_url'] = array(
'#type' => 'hidden',
'#value' => $node->poll_url
);
Comment #2
ndstate commentedThis works! The file to edit is makemeeting.module.
Comment #3
simon georges commentedActually, for the moment, there is no patch attached to the issue, so the issue is not RTBC (yet ;)).
Comment #4
ndstate commentedOh silly me. Well that suggestion works ;)
Comment #5
SebCorbin commented6.x-1.x is now discontinued, closing (you can reopen this in case you made a patch)