Hello.. after upgrading to 6.x-1.10 from 6.x-1.9 on a user-based view I can't use "send email" or "send tokenised email". On the drupal log I have an error "Cannot use %author token in this context."
I cleared the cache and the view cache, tryed it on a newly created view and tried both direct call/batch api but nothing. Only way to work was to go back to 1.9.
Am I the only one with this problem?

Comments

infojunkie’s picture

I'll take a look. But I recommend using Views Send which is a more robust email sending action.

sylvaticus’s picture

ok, thanks..

restyler’s picture

got the same issue

scjv’s picture

I have the exact same problem.
Only tokens of the group "Global" works well.

WoozyDuck’s picture

Priority: Normal » Major

Same issue here, any solutions for this?

WoozyDuck’s picture

Priority: Major » Normal
jelle-e’s picture

Yes, same problem here. I get the following in my syslog:

Jan 19 00:50:19 server drupal: http://website|1295394619|error|10.0.0.1|http://website/usersort|http://website/usersort|4||Cannot use %author token in this context.

Indeed reverting back to 1.9 works! Thanks for that.

Hope it will be solved in a future release.

restyler’s picture

Priority: Normal » Major
WoozyDuck’s picture

No one to help?

infojunkie’s picture

As I suggested previously, Views Send is a module that aims at providing a better replacement to the broken core email action.

_toch’s picture

In revision 1.29.2.9.2.146, there was the following function views_bulk_operations_form_alter

/**
 * Implementation of hook_form_alter().
 *
 * Usability improvements to standard "Send e-mail" action.
 */
function views_bulk_operations_form_alter(&$form, $form_state, $form_id) {
  if (strpos($form_id, 'views_bulk_operations_form') === 0) {
    if (isset($form['operation']) && ($form['operation']['#value']['callback'] == 'system_send_email_action' || $form['operation']['#value'] == 'system_send_email_action')) {
        // Hide recipient field, as we have already chosen it from user list.
        $form['recipient']['#default_value'] = '%author';
        $form['recipient']['#type'] = 'hidden';
    }
  }
}

It disappeared at the next revision 1.29.2.9.2.147

Including it in 6.x-1.10 doesn't work if you don't use a node view because the recipient is set to %author and the function system_send_email_action want a node in order to replace the token %author.

bojanz’s picture

Status: Active » Closed (duplicate)

The issue is already fixed in 6.x-1.x-dev (the offending code was removed).