I have come accross this legacy code on a project and I am in the process of refactoring it. I am wondering if I should use the QueryBuilder API to get all pages on which I need to perform an operation, or if I should recursively loop over the Page and its children to perform said operation. The cur...
I found you can easily add a profile to maven to achieve it:<profile>
<id>autoInstallPackageAuthorAndPublish</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
...
Can you install your package on both Author and Publish with a single Maven command so you do not need to compile the package (and run unit tests) twice?
Is there any official documentation supporting this statement? The Composite NodeStore works by combining one or more static “secondary” node stores with a mutable primary NodeStore. In the case of AEM as a Cloud Service, the /apps and /libs directories are mounted as a secondary SegmentStore, while...
HTL Sightly templates are a blind spot in our code base. We can unit test the Java Classes, the TypeScript scripts or e.g. React.js components, but not the HTL Sightly templates. Does anyone know of a way to (unit) test those?
I was able to find a solution looking at the Unit test for WKND project's ImageList at https://github.com/adobe/aem-guides-wknd/blob/main/core/src/test/java/com/adobe/aem/guides/wknd/core/models/impl/ImageListImplTest.javaThe magic happens at these lines: Field reader = ExtendedCoreComponentImpl.cla...
Yes. I don't want to share too much of the client's setup. It turned out there were issues in the template's stucture. The (layout) container there did not have a sling resourcetype of wcm/foundtation/responsivegrid, but of a nonexisting component where policies were created. And I believe the temp...
I have editable templates on my project, which are using policies. I can see the policies are well linked to the templates, that is not an issue. On these templates, I have a responsive grid with a policy that allows a set of allowed components. The policy is well linked, that is not an issue. How...
I have a long running script that loops over multiple country pages, their language roots and hundreds of pages below each language root. It runs scheduled overnight, but it can also be run manually during the day for one language root at a time. I would like to transform this into a small script th...