New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data streams cannot be deleted or removed from sensor assets #485
Comments
FWIW I only found this issue after fixing #486 |
Ah we have a relevant @todo:
It seems that this |
I suppose we could consider removing the Entity Reference Integrity constraint for Although... that only covers Another idea: the "Remove" option on the Inline Entity Form is currently deleting the referenced entity - not just removing it. I imagine it's possible to configure it such that it only removes and does not delete. This would at least allow you to first remove it, and then delete it. The disadvantage of this, of course, is it assumes a user knows they need to do both. Simply removing the data stream from an asset without deleting the data stream means there would be orphaned data streams in the system. Not the end of the world... and maybe it's time we consider adding a |
Hmmm interesting. It seems important to alert the user that the data stream data will be deleted as well. Another option would be to exclude the
FWIW we had this 😄 - #486 (comment) |
Another issue here - this hook should actually be implemented in |
@paul121 created two commits related to this, which are now in this branch: 2.x...mstenta:2.x-data-stream-references |
Does Inline Entity Form have an option for "removing" without "deleting"? Or is it all-or-nothing? If it does allow removing without deleting, then the best option is probably to add a collection page for administering data streams, allow "removing" them from assets (without deleting), and add a note like you suggest. Something like: "This will unlink the data stream from the sensor asset. The data stream will not be deleted. To delete data streams, go to [collection page]." And on the data stream deletion confirm form, we add: "This will delete all data associated with this data stream!" This would keep Entity Reference Integrity working as intended, allow data streams to be removed from sensor assets, and subsequently deleted, making it clear that data will be deleted along with it. And we can remove the |
It appears that the Entity Reference Integrity module is making it impossible to delete
data_stream
entities when they are referenced by Sensor assets. And when you try to "Remove" the data stream from the sensor asset, it tries to delete the data stream, which then runs into the same issue. So it's a catch-22, and it is not possible to delete data streams without first disabling the Entity Reference Integrity constraint fordata_stream
entities via/admin/config/content/entity-reference-integrity
.The text was updated successfully, but these errors were encountered: