The default entity processor form shows actions which can be triggered when previously imported items are no longer in the feed. This list uses the base id of the action instead of the actual id.

For example the Unpublish action. It uses the base id 'entity:unpublish_action' instead of 'entity:unpublish_action:node' for a node-feed. Luckily, the correct id is the key of the actions definitions array. I'll add a small patch.

Comments

SpadXIII created an issue. See original summary.

spadxiii’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB
megachriz’s picture

Status: Needs review » Needs work

@SpadXIII
What kind of issues are caused when using the base ID instead of actual ID?

This sounds like this needs an update function, as it would affect existing configurations. Existing feed type configurations would need to be updated to use the new action ID.

megachriz’s picture

It seems like the test failed because of a testbot issue, not because there's something wrong with the patch.

spadxiii’s picture

The base id and actual id are different:'entity:unpublish_action' vs 'entity:unpublish_action:node'
By using the base id, there are errors thrown because it can't find the plugin with that id.

And yes, it would need an upgrade for existing feeds (no idea if or how they would work though.. because of the errors)

megachriz’s picture

Has perhaps someting changed in Drupal Core in this regard? I'm using the feature to unpublish content when the source no longer provides it, but for me the action is called 'node_unpublish_action'. That's also what the test \Drupal\Tests\feeds\Functional::UpdateNonExistentTest uses.

megachriz’s picture

Status: Needs work » Needs review

Closed #3080143: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "entity:unpublish_action" plugin does not exist as a duplicate.

Perhaps we do not need an update function as the current one isn't working anyway. I was confused that I had been using the unpublish action with success, but that probably is because I use the older unpublish action called 'node_unpublish_action'.

spadxiii’s picture

That action still works, but is deprecated. So if there should be an upgrade, it should upgrade that to the new method. This might be out of scope for this issue though, because there are several other deprecations to be fixed as well.

ps. I didn't find that closed issue, otherwise I would've added a patch there. :)

megachriz’s picture

@SpadXIII
That other issue is newer (created yesterday) ;)

megachriz’s picture

StatusFileSize
new5.11 KB

Let's see what happens if we update the tests to use the recommended node unpublish action.

  • MegaChriz committed 5288cd6 on 8.x-3.x authored by SpadXIII
    Issue #3078857 by SpadXIII, MegaChriz: Fixed wrong action ID's listed...
megachriz’s picture

Status: Needs review » Fixed

Cool, tests are passing with the updated action ID. Committed #10.

Status: Fixed » Closed (fixed)

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