adobe / adobe/aem-core-wcm-components
[Teaser] The Json export doesn't properly nest Image
Open
Nobody has claimed this yet.
enhancement
requires new version
- Dominant language
- Java
- Stars
- 796
- Forks
- 776
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 8
Description
Bug Report
Current Behavior
If you want to use the Teaser component's JSON export in conjunction with the SPA editor (or another headless approach) the image src is not exported:
"teaser": {
"title": "Lorem Ipsum",
"description": "<p>Is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>\r\n",
"actionsEnabled": false,
"imageLinkHidden": false,
"titleLinkHidden": false,
"actions": [],
+"imagePath": "/content/wknd/en/jcr:content/root/responsivegrid/teaser",
":type": "wknd/components/content/teaser"
}
Expected behavior/code
Ideally the same structure as the imageDelegate is exposed. Something like:
"teaser": {
"title": "Lorem Ipsum",
"description": "<p>Is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>\r\n",
"actionsEnabled": false,
"imageLinkHidden": false,
"titleLinkHidden": false,
"actions": [],
+ "image": {
+ "src":
+ "/content/wknd/en/_jcr_content/root/responsivegrid/image_1364553646.coreimg.jpeg/1540567262779.jpeg",
+ "srcUriTemplate": "/content/wknd/en/_jcr_content/root/responsivegrid/image_1364553646.coreimg{.width}.jpeg/1540567262779.jpeg",
+ "areas": [],
+ "uuid": "122ca431-19c3-4608-9bc7-d2527ac009f5",
+ "lazyEnabled": false,
+ "widths": [],
+ ":type": "wknd/components/content/image"
+ }
":type": "wknd/components/content/teaser"
}
Environment
- AEM 6.4 + SP2
- Core Components version 2.2.0
- JRE version 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Teaser JSON export with the SPA editor scenario described for AEM 6.4 and compare it with the imageDelegate output shown in the issue. The work is done when the export contains a nested image object with the expected image fields instead of only imagePath.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100