- Issue created by @adinancenci
- last update
about 1 year ago Patch Failed to Apply - last update
10 months ago 710 pass, 3 fail - last update
10 months ago 715 pass, 1 fail - last update
10 months ago 715 pass, 1 fail
We created a customized work flow: With the help of a custom event subscriber, we set all new revisions to be in "draft" status.
This had a side effect: It creates new revisions every time the feed is executed.
Cause: The hash is saved to the new draft revision, but next time the feed is executed, it uses the hash from the "current revision", the published one, not the most recent revision created previously.
So it goes in a loop, the hash never matches and new revisions are created over and over.
1. Create an event subscriber service for the FeedsEvents::PROCESS_ENTITY_PRESAVE
event to set the moderation_state
of new revisions to draft
.
2. Import a feed.
3. Make sure the node that was created/updated is in draft status.
3. drush sqlq "UPDATE node_revision__feeds_item SET feeds_item_hash = 'random-nonsense' WHERE entity_id = NODE-ID-GOES-HERE"
4. Import the feed multiple times.
It will create new revisions over and over.
I know this is a problem created by our custom code, but perhaps this scenario could be covered in the module.
At least I am opening this issue and leaving the patch I created in case anyone runs into similar problems.
Active
Code