Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCVAR: Fixed Same Attribute not updating correctly #3275

6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com)
<!-- Keep this up to date! After a release, change the tag name to the latest release -->-

## Unreleased ([details][unreleased changes details])
- #3376 - Redirect Manager: refactor code to not require service user


### Fixed

- #3380 - Remove forced red theme from system notification text body
- #3398 - CreateRedirectConfigurationServlet throws PersistenceException when ancestor node types are different than expected
- #3275 - CCVAR: Fixed Same Attribute not updating correctly.

### Changed

- #3376 - Redirect Manager: refactor code to not require service user
- #3408 - Reduce usage of Apache Commons Lang 2
- #3401 - Move SyslogAppender into separate bundle for onprem only. SyslogAppender does not work in Cloud Service.
- #3390 - Remove usage of commons collections 3
Expand All @@ -27,12 +29,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com)

- #3402 - EnsureOakIndexManagerImpl does not pick up changes in EnsureOakIndex configurations.


## 6.6.2 - 2024-06-25

### Fixed

- #3355 - Fixed system notifications dismissal, and upgraded to CoralUI 3.


### Added

- #3333 - Use lodash embedded by ACS AEM Commons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public void startElement(String uri, String localName, String quaName, Attribute
(String) ContentVariableReplacementUtil.getValue(contentVariableReplacements, key);
String newAttrValue = ContentVariableReplacementUtil.doReplacement(currentAttribute, key,
replaceValue, propertyConfigService.getAction(key));
currentAttribute = newAttrValue;
newAttrs.setValue(i, newAttrValue);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,21 @@ public void testHrefReplacementNotEncoded() throws Exception {
assertEquals("/content/page.html?title=inheritedValue", out.getValue(0));
}

@Test
public void testMultipleAttributeReplacement() throws Exception {
reinitTransformer(true);

AttributesImpl attributes = new AttributesImpl();
attributes.addAttribute(null, "title", null, "CDATA", "((page_properties.jcr:title)) and ((inherited_page_properties.inheritedProperty))");
transformer.startElement(null, "a", null, attributes);

ArgumentCaptor<AttributesImpl> attributesCaptor = ArgumentCaptor.forClass(AttributesImpl.class);
verify(handler, atLeast(1)).startElement(isNull(String.class), eq("a"), isNull(String.class), attributesCaptor.capture());

Attributes out = attributesCaptor.getValue();
assertEquals("Arctic Surfing In Lofoten and inheritedValue", out.getValue(0));
}

private void reinitTransformer(boolean defaultService) throws Exception {
if (defaultService) {
defaultService(context);
Expand Down
Loading