-
Bug
-
Resolution: Fixed
-
Neutral
-
2.4.3
-
None
-
None
Underlying ResourceContainer does not subscribe to ResourceOrigin change monitoring and => is rather vulnerable in the cases when it tries to operate the deleted resources, e.g. expand/collapse a deleted folder:
- Origin throws a resource not found exception, e.g.
Caused by: info.magnolia.resourceloader.ResourceOrigin$ResourceNotFoundException: No resource found for path /test-module in origin layered at info.magnolia.resourceloader.layered.LayeredResourceOrigin.getByPath(LayeredResourceOrigin.java:105) at info.magnolia.resourceloader.layered.LayeredResourceOrigin.getByPath(LayeredResourceOrigin.java:74) at info.magnolia.resources.app.workbench.ResourcesContainer.getParent(ResourcesContainer.java:297) ... 92 more
- Container finds nothing better to do than to throw a RuntimeException.
- Since it happens (may happen) during Vaadin rendering phase - it might cause serious consequences for whole Vaadin app (Internal Error, Vaadin Session borked etc)
See
Ways out:
- either make sure ResourcesContainer somehow synchronises w/ the state of ResourceOrigin
- handle missing resources without runtime exceptions (replace with stubs or smth)
Acceptance criteria
- relates to
-
MAGNOLIA-6223 Provide proper API for resource change communication
- Closed