-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Entity stays invisible when deleting Zone #795
Comments
This is not a bug, it is the expected behavior. You need to manage the parenting if you delete the zone. Also revealing imply to know what zone is a broken link. Doing this would have a performance cost. |
yeah I agree that this is the correct behavior. maybe when you delete a zone, its ID should be removed from all renderWithZones lists? but we don’t currently keep track of that mapping anywhere and it would be a bit expensive to loop over all entities. we’d have to figure out where to put that logic…create or interface could not have loaded entities yet or might not have edit permission, so I guess it would be on the entity server |
There are other reasons to obtain a broken link by the way. (Copy of the entity in a different domain, import a json that has an id but with no zone ) Most of the time I prefer to have a clue that there was a broken link (in order to manage it) I would say: Caution with changing this behavior for something destructive. |
fair 😁 I think the entity list can show you when URLs are broken, right? maybe it could also show a warning for this |
We could have this kind of thing yes. |
Maybe a tool specifically to manage the broken links. |
I suggest we close this now. |
This doesn't fix the original issue as far as I can tell. |
The find entity can’t be trusted for that, it might not not return entities that are far and small and never been visited in the current session. So such warning might fail to advise you and this entity will stay hidden anyway. Also there is the case where you paste entities that come from another domain and have a value in renderWithZones. Same issue here. We can’t trust the Find entities, so zone zone might be wrongly considered as missing. So you might get the no warning and still get the pasted entities not visible. |
If Create App itself cannot do it, maybe we should have the server deal with it. My understanding is that we just need to have the server run the search for entities. Since people who can add and remove zones already have Create permissions, their client should be able to send commands to the server. If our permission system becomes more fine grained in the future, we could add a special function for that; I think @74hc595 has done something similar here: #664 |
yeah... but create app should also work for serverless. |
I would vote for doing this one the create side rather than the server so that we don't have to worry about the permissions issues (and so that this will work in serverless, great point). I agree that findEntities might miss an entity, or that the client might not have permissions to modify the other entities, but those cases should be rare and the new RenderWithZones manager makes it easy to resolve. separately, for the pasting issue, renderWithZones IDs should get re-written when pasting entities so that they target the new ID. if that's not working as intended we should fix it |
I undertsand that you will continue to set the id in renderwithzone only if the zone is part of the copy? |
I think that's how it's supposed to work 😜 |
When you delete the zone that an entity is using as part of "Render With Zones", the entity will stay hidden and display an "ERROR: NOT FOUND".
The error seems nice, but I would argue that an entity should not be culled if the zone that culls it does not exist.
The text was updated successfully, but these errors were encountered: