Skip to content

Commit

Permalink
SITES-25061 - Category url format not working as expected in cloud in…
Browse files Browse the repository at this point in the history
…stance (#1019)

* category URL fix - convert HTML encoded catergoryUid back into the actual characters
* adding the required dependencies
* AEM-uber jar version upgrade to 6.5.18
* fixing the test classes issue with increasing gson
* docker image version upgrade for SP 18
* docker cloud-image version upgrade to recent
* SP version upgrade to SP 18 which is now required
* resolves the cloud bundle issues
* fix for test case failure in AEM65
* adds categorycarousel component resource type to sling model to resolve the integration test issue

---------

Co-authored-by: Alwin Joseph <aljoseph@adobe.com>
  • Loading branch information
Satish-Pothabathula and alwinjoseph02 authored Sep 25, 2024
1 parent 50fd2de commit 618dfc9
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ executors:
docker:
- image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-qp:6.4.6-openjdk11
<<: *docker_auth
- image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:9398-openjdk11
- image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem-cloudready:14227-openjdk11
<<: *docker_auth
test_executor_655:
docker:
- image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-qp:6.4.6-openjdk11
<<: *docker_auth
- image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem:6.5.8-openjdk11
- image: docker-adobe-cif-release.dr-uw2.adobeitc.com/circleci-aem:6.5.18.0-openjdk11
<<: *docker_auth

jobs:
Expand Down
7 changes: 6 additions & 1 deletion bundles/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<!-- Enable processing of OSGI metatype annotations -->
<_metatypeannotations>*</_metatypeannotations>
<Import-Package>
com.adobe.cq.dam.cfm.content;version="[1.1.0,2)",
javax.annotation;version=0.0.0,
!org.apache.sling.sitemap.*,
!com.adobe.aem.wcm.seo.*,
Expand Down Expand Up @@ -368,6 +369,10 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down Expand Up @@ -528,7 +533,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<version>2.8.9</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@
@Model(
adaptables = SlingHttpServletRequest.class,
adapters = { FeaturedCategoryList.class, ComponentExporter.class },
resourceType = com.adobe.cq.commerce.core.components.internal.models.v1.categorylist.FeaturedCategoryListImpl.RESOURCE_TYPE)
resourceType = {
com.adobe.cq.commerce.core.components.internal.models.v1.categorylist.FeaturedCategoryListImpl.RESOURCE_TYPE,
"core/cif/components/commerce/categorycarousel/v1/categorycarousel"
})
@Exporter(
name = ExporterConstants.SLING_MODEL_EXPORTER_NAME,
extensions = ExporterConstants.SLING_MODEL_EXTENSION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.io.IOException;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.rewriter.DefaultTransformer;
import org.apache.sling.rewriter.ProcessingComponentConfiguration;
Expand Down Expand Up @@ -143,7 +144,7 @@ public void startElement(String uri, String localName, String qName, Attributes
linkInfo = new LinkInfo(urlProvider.toProductUrl(request, currentPage, productSku));
}
} else {
String categoryUid = attributes.getValue(ATTR_CATEGORY_UID);
String categoryUid = StringEscapeUtils.unescapeHtml4(attributes.getValue(ATTR_CATEGORY_UID));
if (StringUtils.isNotBlank(categoryUid)) {
Page currentPage = request.getResourceResolver().adaptTo(PageManager.class).getContainingPage(request.getResource());
if (replaceText) {
Expand Down
2 changes: 1 addition & 1 deletion examples/bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<version>2.8.9</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void testProductPageWithSampleData65() throws Exception {
doc -> doc.select("meta[name=keywords]").first().attr("content"), "Meta keywords for Chaz Kangeroo Hoodie",
doc -> doc.select("meta[name=description]").first().attr("content"), "Meta description for Chaz Kangeroo Hoodie",
// 6.5.8 uses the externalizer author link to create the canonical link
doc -> doc.select("link[rel=canonical]").first().attr("href"), "http://localhost:4502" + pagePath));
doc -> doc.select("link[rel=canonical]").first().attr("href"), pagePath));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void testProductListPageWithSampleData65() throws Exception {
doc -> doc.select("meta[name=keywords]").first().attr("content"), "Meta keywords for Outdoor Collection",
doc -> doc.select("meta[name=description]").first().attr("content"), "Meta description for Outdoor Collection",
// 6.5.8 uses the externalizer author link to create the canonical link
doc -> doc.select("link[rel=canonical]").first().attr("href"), "http://localhost:4502" + pagePath));
doc -> doc.select("link[rel=canonical]").first().attr("href"), pagePath));
}

@Test
Expand Down
8 changes: 7 additions & 1 deletion parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.5.8</version>
<version>6.5.18</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -1007,6 +1007,12 @@
<version>${core.wcm.components.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>
<scope>provided</scope>
</dependency>

<!-- Testing -->
<dependency>
Expand Down

0 comments on commit 618dfc9

Please sign in to comment.