Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
Platform Sprint 158: Hardening
Description
Currently all Hippo projects must (do) create the root /content node within their own project bootstrap configuration.
Which is (was) fine, as long as Hippo product modules don't rely on this for their own bootstrap configuration.
However, this isn't really the case, like eforms, taxonomy, urlrewriter etc. all need/expect /content to have been bootstrapped to be able to add their module specific content/configuration underneath it. Which requires a tricky/brittle usage of using a higher initialize item sequence number than (assumingly) will be used by the project to (first) bootstrap /content.
Furthermore, when we migrate to the new HCM/yaml based configuration management, this 'trick' even won't work anymore (as we no longer use initialize items nor sequence numbers then).
So, to fix this properly, the /content node as well as its immediate /documents, /gallery, /assets and /attic child nodes will become part of the product bootstrap configuration, and done so through the repository-workflow module (as then/there the required nodetypes will have been bootstrapped).
New initialize item needed in repository-workflow hippoecm-extension.xml:
<sv:node sv:name="content-root"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>hippo:initializeitem</sv:value> </sv:property> <sv:property sv:name="hippo:sequence" sv:type="Double"> <sv:value>603.0</sv:value> </sv:property> <sv:property sv:name="hippo:contentresource" sv:type="String"> <sv:value>content-root.xml</sv:value> </sv:property> <sv:property sv:name="hippo:contentroot" sv:type="String"> <sv:value>/</sv:value> </sv:property> </sv:node>
And the content of the new content-root.xml file:
<?xml version="1.0" encoding="UTF-8"?> <sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="content"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>hippostd:folder</sv:value> </sv:property> <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> <sv:value>mix:referenceable</sv:value> </sv:property> <sv:property sv:name="hippostd:foldertype" sv:type="String"> <sv:value>new-document</sv:value> <sv:value>new-folder</sv:value> </sv:property> <sv:node sv:name="documents"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>hippostd:folder</sv:value> </sv:property> <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> <sv:value>mix:referenceable</sv:value> </sv:property> <sv:property sv:name="hippostd:foldertype" sv:type="String"> <sv:value>new-folder</sv:value> <sv:value>new-translated-folder</sv:value> </sv:property> </sv:node> <sv:node sv:name="gallery"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>hippogallery:stdImageGallery</sv:value> </sv:property> <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> <sv:value>mix:referenceable</sv:value> </sv:property> <sv:property sv:name="hippostd:foldertype" sv:type="String"> <sv:value>new-image-folder</sv:value> </sv:property> <sv:property sv:name="hippostd:gallerytype" sv:type="String"> <sv:value>hippogallery:imageset</sv:value> </sv:property> </sv:node> <sv:node sv:name="assets"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>hippogallery:stdAssetGallery</sv:value> </sv:property> <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> <sv:value>mix:referenceable</sv:value> </sv:property> <sv:property sv:name="hippostd:foldertype" sv:type="String"> <sv:value>new-file-folder</sv:value> </sv:property> <sv:property sv:name="hippostd:gallerytype" sv:type="String"> <sv:value>hippogallery:exampleAssetSet</sv:value> </sv:property> </sv:node> <sv:node sv:name="attic"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>hippostd:folder</sv:value> </sv:property> <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> <sv:value>mix:referenceable</sv:value> </sv:property> </sv:node> </sv:node>
The above changes are not all though: as this now becomes part of the product configuration, all current/existing projects, as well as the archetype, need to be updated too, removing the bootstrapping of the above content!
Attachments
Issue Links
- causes
-
ARCHE-536 Remove /content bootstrapping from archetype
- Closed
-
HGGE-384 Remove /content bootstrapping from GoGreen project
- Closed
-
HIPPLUG-1469 Remove bootstrapping of /content nodes from plugin demos
- Closed
-
HSTTWO-4049 Remove bootstrapping of /content nodes from testsuite
- Closed