Koper74 Posted March 17, 2022 Posted March 17, 2022 (edited) In the output of /cms/records/{database_id}/{record_id} often the whole <a>-Tag ist missing when it's inside a <figure>-Tag: Original code: <figure class="image ipsImage_thumbnailed ipsImage" style="float:right"> <a href="https://xxx.xxx/uploads/monthly_2019_09/XXX-Meldung.PNG.1abaebb2048f2ea1be9a31bf3198e66c.PNG" title="Enlarge image" data-wrappedlink="" data-ipslightbox="" data-ipslightbox-group="undefined"> <img alt="XXX-Meldung.PNG" data-fileid="11960" data-ratio="19.43" data-unique="hd84ad2uk" height="78" style="" title="" width="400" src="https://xxx.xxx/uploads/monthly_2019_09/XXX-Meldung.PNG.1abaebb2048f2ea1be9a31bf3198e66c.PNG" class="ipsImage_thumbnailed"> </a> <figcaption> Lorem ipsum dolor sit amet </figcaption> </figure> Output REST API: <figure class=\"image ipsImage_thumbnailed ipsImage\" style=\"float:right\"> \n\t<img alt=\"XXX-Meldung.PNG\" data-fileid=\"11960\" data-ratio=\"19.43\" data-unique=\"hd84ad2uk\" height=\"78\" style=\"\" title=\"\" width=\"400\" src=\"https:/xxx.xxx/uploads/monthly_2019_09/XXX-Meldung.PNG.1abaebb2048f2ea1be9a31bf3198e66c.PNG\"> \n\t<figcaption>\n\t\tLorem ipsum dolor sit amet\n\t</figcaption> \n</figure> This happens only with these constructs and only in ~35% of them. I can't see a pattern!? Edited March 17, 2022 by Koper74
Marc Posted March 17, 2022 Posted March 17, 2022 Do you have an example of this you can provide me with please? I can then get a ticket raised and this escalated for someone to take a look at
Koper74 Posted March 17, 2022 Author Posted March 17, 2022 Yes, you can see this in db#41 / record#68 on our test system. You can find the Client Secret for OAuth in our access information (field "Notes").
Koper74 Posted March 22, 2022 Author Posted March 22, 2022 Hi @Marc Stridgen did you take a look on this? Is there anything I can do to support you?
Marc Posted March 22, 2022 Posted March 22, 2022 I have flagged this for one of our developers to advise on. Someone will be in contact as soon as possible.
Matt Finger Posted March 22, 2022 Posted March 22, 2022 Hello Koper74, glad to hear you're utilizing the API for your needs. The API for CMS Records actually will return field values exactly as they are stored in the database. To confirm, have a look at record 68 in cms_custom_database_41 and you will see there is no <a> tag wrapping the image. That <a> tag wrapping the image is added on the front end and is used as the button that blows up the image in a modal view. Jim M 1
Ryan Ashbrook Posted March 22, 2022 Posted March 22, 2022 To add to that, the <a> tag is added using Javascript. If you disable Javascript in your browser and load the page, you'll likely see the same thing the API is sending.
Koper74 Posted March 22, 2022 Author Posted March 22, 2022 (edited) Hello and thank you both - that brought some light in the dark What is still confusing me: Our editors adding images in records always the same way via a custom ckeditor-button. The "blow up"-link always get added automatically. Sometimes like that - which is also stored in database / included in JSON: <figure class="image ipsImage_thumbnailed ipsImage" style="float:right"> <a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="12482" href="https://xxx.xx/uploads/monthly_2019_10/1410821622_xxx.png.a2bd3a311d2f687cbafd897f1fb9c51f.png" rel="" data-fullurl="https://xxx.xx/uploads/monthly_2019_10/1410821622_xxx.png.a2bd3a311d2f687cbafd897f1fb9c51f.png" data-ipslightbox="" data-ipslightbox-group="g86105"><img alt="xxx" data-fileid="12482" data-ratio="157.56" data-unique="p3qeq7gap" height="315" style="" title="" width="200" src="https://xxx.xxx/uploads/monthly_2019_10/576538826_xxx.thumb.png.735c9a541dadb92ba62778fa3669a6a7.png" class="ipsImage_thumbnailed"></a> <figcaption> Abb. 2: xxx </figcaption> </figure> Sometimes like that - here the <a>-Tag is missing in JSON-output: <figure class="image ipsImage_thumbnailed ipsImage" style="float:right"> <a href="https://xxx.xx/uploads/monthly_2019_10/1460915268_xxx.png.23f81a1a140efd7cdeb6d454ecdfdda1.png" title="Enlarge image" data-wrappedlink="" data-ipslightbox="" data-ipslightbox-group="undefined"><img alt="xxx" data-fileid="12492" data-ratio="107.14" data-unique="bg9y9kdtf" height="214" width="200" src="https://xxx.xx/uploads/monthly_2019_10/1460915268_xxx.23f81a1a140efd7cdeb6d454ecdfdda1.png" class="ipsImage_thumbnailed"></a> <figcaption> Abb. 3: 5-GHz-WLAN-Umgebung </figcaption> </figure> You can check this at record 110 in cms_custom_database_41: The 1st and 2nd image is OK and we can "blow it up" in our own application also. The 3rd can only blowup in IPS record view. How can we avoid this? Edited March 22, 2022 by Koper74
Recommended Posts