Drupal 7 批处理完成消息未显示

Drupal 7 批处理完成消息未显示,drupal-7,batch-processing,drupal-modules,Drupal 7,Batch Processing,Drupal Modules,我使用此代码在drupal 7中导入CSV文件的过程中完成批处理操作后显示消息。但是我的代码不起作用 function task_importer_form_finished($success, $results, $operations) { if($success){ drupal_set_message(t('@count items processed.', array('@count' => count($results)))); }else{ // An error

我使用此代码在drupal 7中导入CSV文件的过程中完成批处理操作后显示消息。但是我的代码不起作用

  function task_importer_form_finished($success, $results, $operations) {
if($success){
  drupal_set_message(t('@count items  processed.', array('@count' => count($results))));
}else{
// An error occurred.
// $operations contains the operations that remained unprocessed.
   $error_operation = reset($operations);
   $message = t('An error occurred while processing %error_operation with arguments: @arguments', array('%error_operation' => $error_operation[0], '@arguments' => print_r($error_operation[1], TRUE)));
   drupal_set_message($message, 'error');
 }
}


在消息中,已导入显示行数的需要,但某些行尚未成功导入,带行号。

请阅读关于良好的批处理api实践的文档和示例,我已经尝试了所有这些,但仍然没有希望。请阅读关于良好的批处理api实践的文档和示例,我已经尝试了所有这些,但仍然没有希望。