Just ran across something that I wanted to post here. I had previously created a Space with Sub-spaces and Sections. I deleted the Spaces but it seems the "Discussion Posts" sections were left. Shouldn't any Sections that are beneath a Space get deleted also? I ask because I didn't even realize this until I went to update some "URL Aliases" and received an error during the batch process.
Error message
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=43&op=do StatusText: Service unavailable (with message) ResponseText: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7795 of /var/www/cedisociety/public/includes/common.inc).
It seems to me that if you have Sections that exist within a Space and that Space is deleted the Section(s) should be deleted along with any Subspaces of that Space.
To reproduce:
- Create a Space
- Create a Subspace
- Within that Subspace create a Discussion Post Section
- Create a "Post" within that Section
- Delete the Space
- goto:
/admin/config/search/path/delete_bulk - Delete the "Content" aliases
- goto:
/admin/config/search/path/update_bulkand generate new aliases for "Content Paths"
You should get the error above.
If I remove the Section and Subspace then I no longer get the error. If I leave one or the other then the error persists.
Any ideas on how we should approach this. I'm pretty sure it's because there are paths trying to be rebuilt that are referencing the Space that no longer exists. Thoughts would be appreciated.
Thanks
-- Scott
Comments
Comment #1
scottalan commentedComment #2
scottalan commentedI realize this is by design but it makes me think; What good is it to have Subspaces and Sections left over that once belonged to a Space if that Space no longer exists. I realize that you can/should delete each Section or Subspace, but I came across this accidentally when I left some Discussion Posts that once belonged to a Space I deleted. This could cause major confusion when this happens.
Comment #3
hefox commentedPushed fix on github for fatal error
However, there is a setting in OG to delete child content when space is deleted (via queue), see OG settings under config.
Comment #4
hefox commented