#3493 closed Defect (fixed)
delete_entity() can cause IOException:FailedToLoadGUID
| Reported by: | coldtrick | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Elgg 1.7.11 |
| Component: | Groups | Version: | 1.7 |
| Severity: | major | Keywords: | group, delete, ioexception |
| Cc: | brett@… | Difficulty: |
Description
case:
A group owner (not site admin) wants to delete his group. In this group there is a private blog (or file or ...).
This causes an IOException:FailedToLoadGUID as the private blog is being deleted.
Cause:
all entities in the group are fetched without access suffix, but after this the entity is loaded with access suffix.
Possible solution:
in the action group/delete set ignore access, this will make sure all content in the group is deleted.
Change History (4)
comment:1 Changed 2 years ago by cash
comment:2 Changed 23 months ago by ewinslow
- Milestone changed from Needs Review to Elgg 1.7.11
I think it's a good idea to tie items tightly to their containers in this way. If plugins don't want this behavior, they should be using relationships instead (as you said, design problem).
Not confident that 1.7.11 is an appropriate milestone, but we can always reassign...
comment:3 Changed 22 months ago by Brett Profitt
- Resolution set to fixed
- Status changed from new to closed
Fixes #3493. Disabling access controls when recursively deleting objects if a user can edit the container.
Changeset: f851b0a326dffa822c9961acc0feb1ed48c818f3
comment:4 Changed 19 months ago by cash
The commit for 1.8 for this one is [0cf99813eb034aa1219a15ba86a105d63a584cc0]

When a container is deleted, all content in the container should be deleted or we need to prevent the deletion. I think this should be handled in core rather than in a plugin.
Can anyone think of a time when we don't want to delete an entity in a container when the container is deleted? Even if we do, that would signal to me a design issue with the plugin rather than something we need to handle in core.