Hi,
after first installation of Commerce Email, i get this error:

•Notice: Undefined index: module en variable_type_include() (línea 421 de .../modules/variable/variable.module).
•Notice: Undefined index: module en variable_type_include() (línea 421 de .../modules/variable/variable.module).
•Notice: Undefined index: module en variable_type_include() (línea 421 .

i have commerce 7.x-1.2 and multilanguage, variable 7x.1.1 and variable email.

Comments

timodwhit’s picture

Same. Any update?

Fernly’s picture

I got the same issue. It seems there is a problem with the email's body field?

Fernly’s picture

Status: Active » Needs review

The problem lays within the variable_email module.

In the file variable_email.variable.inc change this function:

function variable_email_build_mail_html($variable, $options = array()) {
  $name = str_replace('[mail_part]', '', $variable['name']);
  // For mail text, children have different types
  $variable['children'][$name . 'subject']['type'] = 'string';
  $variable['children'][$name . 'body']['type'] = 'text_format';
  $variable = variable_build_multiple($variable, $options);
  return $variable;
}

to

function variable_email_build_mail_html($variable, $options = array()) {
  $name = str_replace('[mail_part]', '', $variable['name']);
  // For mail text, children have different types
  $variable['children'][$name . 'subject']['type'] = 'string';
  $variable['children'][$name . 'body']['type'] = 'text';
  $variable = variable_build_multiple($variable, $options);
  return $variable;
}

Changes are on line 28:
The variable type of the email body can't be "text_format", this has to be "text".

The field is now displayed as a textarea, no text filters available here. But at least we now have a field to edit the mail body. Perhaps some more changes are needed? Cheers.

timodwhit’s picture

It would be nice to be able to filter what type of text is used, but making the change is hugely beneficial and now addresses the issue as to why this module wasn't displaying properly! Thanks for the fix!

This was definitely a highlight of the week for me. :-)

elmotri’s picture

Status: Needs review » Closed (works as designed)

Works with the dev version of variable. http://drupal.org/project/variable

aidanlis’s picture

Status: Closed (works as designed) » Active

Not for me ...

aidanlis’s picture

The change in #3 works for me.

Denes.Szabo’s picture

After upgrade the variable module to the dev version, then it works.

kristofferwiklund’s picture

Upgrading the variable module to the dev version also works for me.

drasgardian’s picture

Upgrading the variable module to the latest dev did not fix this for me. But the change in #3 did work.

mgifford’s picture

Project: Commerce Email » Variable

Moving this to the Variable module as this seems to be where it should be managed.