diff --git a/plugins/FeedsEntityProcessor.inc b/plugins/FeedsEntityProcessor.inc index e5f924d9607bc3b439cdc6456c74e7bc6f1e45a4..833800f9e20600ff07e7cbf0f6bd54f0d4fec9b9 100644 --- a/plugins/FeedsEntityProcessor.inc +++ b/plugins/FeedsEntityProcessor.inc @@ -97,13 +97,15 @@ class FeedsEntityProcessor extends FeedsProcessor { } if (!$access) { - $message = 'User %name is not authorized to %op entity %entity.'; - $args = array( + $message = t('The user %name is not authorized to %op entity %entity_type. To import this item, the user "@name" (owner of the item) must be given the permission to @op entity @entity_type.', array( '%name' => $author->name, '%op' => $op, - '%entity' => $this->entityType(), - ); - throw new FeedsAccessException(t($message, $args)); + '%entity_type' => $this->entityType(), + '@name' => $author->name, + '@op' => $op, + '@entity_type' => $this->entityType(), + )); + throw new FeedsAccessException($message); } } } diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc index 203685aa3d772912e70df5f81230fd4f656beb25..8b63c53305a8a87f07fcc7aed60489218f25b469 100644 --- a/plugins/FeedsNodeProcessor.inc +++ b/plugins/FeedsNodeProcessor.inc @@ -104,8 +104,15 @@ class FeedsNodeProcessor extends FeedsProcessor { } if (!$access) { - $message = 'User %name is not authorized to %op content type %content_type.'; - throw new FeedsAccessException(t($message, array('%name' => $author->name, '%op' => $op, '%content_type' => $entity->type))); + $message = t('The user %name is not authorized to %op content of type %content_type. To import this item, either the user "@name" (author of the item) must be given the permission to @op content of type @content_type, or the option "Authorize" on the Node processor settings must be turned off.', array( + '%name' => $author->name, + '%op' => $op, + '%content_type' => $entity->type, + '@name' => $author->name, + '@op' => $op, + '@content_type' => $entity->type, + )); + throw new FeedsAccessException($message); } } } diff --git a/tests/feeds_processor_node.test b/tests/feeds_processor_node.test index cc514b8c523fd73fef85d7b279fab31a3d7eec0e..fb5491febd925dab517353e2ba9b8774019a341c 100644 --- a/tests/feeds_processor_node.test +++ b/tests/feeds_processor_node.test @@ -437,7 +437,7 @@ class FeedsRSStoNodesTest extends FeedsWebTestCase { $nid = $this->createFeedNode(); $this->assertText('Failed importing 10 nodes.'); - $this->assertText('User ' . $account->name . ' is not authorized to create content type article.'); + $this->assertText('The user ' . $account->name . ' is not authorized to create content of type article.'); $node_count = db_query("SELECT COUNT(*) FROM {node}")->fetchField(); // We should have 1 node, the feed node.