Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
1.01.04
Description
org.onehippo.cms7.essentials.components.CommonComponent#setContentBean (https://github.com/onehippo/essentials/blob/b1b4521b440624d325d91ad765b6a527b9fb6772/components/hst/src/main/java/org/onehippo/cms7/essentials/components/CommonComponent.java)
https://gist.github.com/mrop/d125aa2b2610a3d09781
creates a fallback to getting the content bean.
The method is used as well by the EssentialsDocumentComponent (https://github.com/onehippo/essentials/blob/b1b4521b440624d325d91ad765b6a527b9fb6772/components/hst/src/main/java/org/onehippo/cms7/essentials/components/EssentialsDocumentComponent.java ). In general I think a drag 'n drop component should be independent of the context as it can be dropped everywhere.
Imagine one drags a component into a page and the document has not been picked yet. The jsp expects a certain document type, so it will fail.
( A workaround is of course to use hst:isreadable and some extra checks in the jsp. )
Please remove the fallback.