Both the notification and confirmation emails contain just the first character of the default messages.

Comments

kars-t’s picture

I know this bug and thought I already fixed it. Could you please check if you have the latest version and if that not helps if ecard.mai.inc line 57 looks like this:

$message['body'][] = token_replace(theme('ecard_letter', array('message' => $params['ecard']->mail['letter']['ecard_letter']['value'])), $params);
fultonchain’s picture

Yes, they are the same. This is what I have on line 57:

$message['body'][] = token_replace(theme('ecard_letter', array('message' => $params['ecard']->mail['letter']['ecard_letter']['value'])), $params);
kars-t’s picture

Assigned: Unassigned » kars-t

Okay thanks for confirming this.

kars-t’s picture

Status: Active » Postponed (maintainer needs more info)

I finally found some time. I can't reproduce this and it currently doesn't make much sense to me. This did occure because the theme() function expects an array as parameter. If I give a string and use that as array the result will be the first character from the array.

If you please could tell me how you did configure E-Card maybe I can reproduce this. Otherwise we have to wait for the simpletest and see if that uncovers some bugs.

fultonchain’s picture

Thanks for the time you've spent on this.

I'm not sure what configuration info I can provide but I have created an administrator account for you. You are more than welcome, as time allows, to look things over for yourself.

jsloan’s picture

I encountered the same error with a fresh install of 7.8 using the 7.x-1.x-dev(2011-Sep-28) release of ecard using all the defaults.

In ecard.mail.inc I discovered that the $params entity object passed to function ecard_mail() did not have an array element named ['value'].

$params['ecard']->mail['letter']['ecard_letter'] is as far as it goes.

When I removed reference to it on lines 58, 63, 68 the email messages were fine.

Also, there was a typo in ecard.module in the function _ecard_copy() as the token [ecard:card_url] should be [ecard:ecard_url]

thanks
jim

fultonchain’s picture

Component: Miscellaneous » Code

Jsloan, thanks so much!

That seems to have done the trick.

kars-t’s picture

Status: Postponed (maintainer needs more info) » Needs work

Okay I thought I did test that and will test it again asap.

kars-t’s picture

Fixed the typo. But I still do not understand why my local drupal seems to behave differently...

kars-t’s picture

Status: Needs work » Fixed

Weird weird weird. Now as I did save the field again I suddenly could reproduce and verify the bug. And than I removed ['value'] just as suggested. Now it works... submitted to dev.

fultonchain’s picture

+1

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.