Details
Description
When this works fine in 13.2.0, we should even think about backporting this since in earlier versions this might be confusing. Also the commits/workaround in HSTTWO-4548 can then be undone (not the unit test, that one should keep working)
When an hst:mount defines the property
hst:pagemodelapi
then the value of this property (assume it is 'resourceapi') , then an in memory mount with name 'resourceapi' will be appended below the mount defining the property 'hst:pagemodelapi'. This way, the normal website can be accessed via the explicit mount, and the pagemodelapi output via the in memory added mount. However, the PageModelApiMount impl always returns null for #getChannel. This might result in problems if for example an HstComponent accessed #getChannel and expects it not to be null or wants to serialize its value via the pagemodelapi output. Currently, the HstComponent should add a check something like
Mount mount = requestContext.getResolvedMount().getMount(); if (PAGE_MODEL_PIPELINE_NAME.equals(mount.getNamedPipeline()) && mount.getParent() != null) { mount = mount.getParent(); }
This is error prone and shouldn't be needed. Instead, we page model api mount on #getChannel should just try to return the channel of the parent mount by default.
Getting the parent mount can then be removed from
- CmsComponentComponentWindowAttributeContributor
- CmsComponentWindowResponseAppender
- AbstractVirtualBeanPropertyWriter
Attachments
Issue Links
- blocks
-
HSTTWO-4571 Fix for page model working with WPM projects was reverted
- Closed
- causes
-
HSTTWO-4581 SPA++ page model output does not serve branched content but always content from master
- Closed
- relates to
-
HSTTWO-4548 Containers & Components in the pagemodel api are missing the HST-LockedBy and HST-LockedBy-Current-User metadata
- Closed
-
HSTTWO-4257 [SPA++] Support to auto-create the 'resourceapi' mount
- Closed
-
HSTTWO-4294 [SPA++] Include image variants data with width and height properties at minimum
- Closed