Hello @asi ,
unfortunately I still get the error from my last post:
2022-04-20 17:03:24,423 WARN c.e.x.p.impl.url.PortalUrlBuilder - Portal url build failed
java.lang.IllegalArgumentException: Could not find attachment with label [source] on content [35cb1f22-ed1a-4b43-951e-8d629e799a6a]
This is the content-item- holding the atachement:
{
"_id": "35cb1f22-ed1a-4b43-951e-8d629e799a6a",
"_name": "market_news_257358",
"_path": "/hltest/marktnews/2022/04/market_news_257358",
"creator": "user:system:su",
"modifier": "user:system:su",
"createdTime": "2022-04-12T06:05:03.461936Z",
"modifiedTime": "2022-04-19T02:48:01.796048Z",
"owner": "user:system:su",
"type": "org.lienas.webpack:marketNews",
"displayName": "GoTo: Südostasiatische E-Commerce- und Ride-Hailing-Plattform legt erfolgreiches Börsendebüt aufs Parkett",
"hasChildren": true,
"valid": true,
"childOrder": "modifiedtime DESC",
"data": {
"title": "GoTo: Südostasiatische E-Commerce- und Ride-Hailing-Plattform legt erfolgreiches Börsendebüt aufs Parkett ",
"link": "http://www.it-times.de/news/goto-suedostasiatische-e-commerce-und-ride-hailing-plattform-legt-erfolgreiches-boersendebuet-aufs-parkett-143596/",
"description": " JAKARTA (IT-Times) - Die asiatische E-Commerce-Plattform Tokopedia und der asiatische Ride-Hailing Anbieter Gojek haben sich zur GoTo Group zusammengetan und heute...",
"pubDate": "2022-04-11T21:00:46Z",
"content": " JAKARTA (IT-Times) - Die asiatische E-Commerce-Plattform Tokopedia und der asiatische Ride-Hailing Anbieter Gojek haben sich zur GoTo Group zusammengetan und heute...",
"source": "IT Times",
"image": "https://www.it-times.de/resources/dam/asset/22278/ittimes_news_detail.jpg",
"guid": {
"contents": "257358",
"isPermaLink": false
},
"imageAttachment": "b7fe2d11-16cc-490c-931b-984f784290d9",
"attachment": "Bildschirmfoto 2022-03-29 um 15.12.37.png"
},
"x": {},
"page": {},
"attachments": {
"Bildschirmfoto 2022-03-29 um 15.12.37.png": {
"name": "Bildschirmfoto 2022-03-29 um 15.12.37.png",
"size": 1431810,
"mimeType": "image/png"
}
},
"publish": {}
}
and I simply call it like this:
const attachmentUrl = portal.attachmentUrl({
id: "35cb1f22-ed1a-4b43-951e-8d629e799a6a",
});
I submitted label, because I misunderstood the documentation, which says, that label default value is “source” and error says cannot find the attachment with label source, although I did not set a label !
When I manually set the label to “source” in Data Toolbox, then it works.
So I guess it is a bug!