Closed (fixed)
Project:
Feeds
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jul 2021 at 11:36 UTC
Updated:
15 Aug 2021 at 15:24 UTC
Jump to comment: Most recent
Can't delete a feed that has been orphaned, i.e. the feed type has been deleted. Here's the php error:
Drupal\Core\Entity\EntityStorageException: The feed type "my_feed_import" for feed XX no longer exists. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (row 758 of /backend/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Create feed type and feed.
Delete feed type.
Try to delete feed.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
iamfredrik commentedComment #3
megachrizHow did you delete the feed type? Access for deleting a feed type is denied when there are still feed entities of it. Did you do that somewhere in the UI or programmatically?
I also tried to delete a feed type using a config import, but that resulted into the following warning:
I do can delete the feed type programmatically:
And then I can indeed reproduce the issue.
Workaround
A possible workaround is to recreate the feed type and then delete the feed that you want to delete.
I'm working on a fix.
Comment #4
megachrizCode is available in the issue fork. I only did some minimal testing. Needs automated tests.
Comment #6
iamfredrik commentedSorry, the feed type was apparently deleted with 8.x-3.0-alpha10. The error above came after updating to dev because of the related issue. If the problem is fixed by not allowing deletion of feed types, then this can be closed.
Comment #7
megachriz@iamfredrik
Yeah, I think during normal user operations it should never happen. But the fact that it did happen in your case and I already wrote a possible fix, I think I might as well finish it off now.
I added a test for this case. Let's see if it passes.
Comment #10
megachrizI merged the code!