adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
733 stars 743 forks source link

[Teaser] Title, description displayed even if "Get # from linked page" selected and no page is linked #268

Closed richardhand closed 5 years ago

richardhand commented 6 years ago

Bug Report

Current Behavior The default dialog selection for the Teaser component is to read the title and description from the linked page.

This isn't reflected in the Teaser model, which defaults to false for both title and description from page properties. [0]

This results in the title being displayed for the Teaser if a jcr:title is set at the component node, no page is linked and the dialog properties haven't yet been saved, even though the dialog options say otherwise.

Expected behavior/code Expectation would be that no title is displayed while the "Get title from linked page" and "Get description from linked page" edit dialog options are selected, no page linked, and dialog properties haven't yet been saved, even if a jcr:title property is present.

Environment

Possible Solution Suggested fix is to flip the defaults at [0] to true.

[0] - https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components/blob/master/bundles/core/src/main/java/com/adobe/cq/wcm/core/components/internal/models/v1/TeaserImpl.java#L69 (CQ-4250676)

richardhand commented 5 years ago

This was added with the merge of #346 and is on master. It will be available in the upcoming 2.2.2 release.