Bug / Breaking change in Cornerstone Custom "Control Type: Image" output

After upgrading from Cornerstone v7.4.11 to v7.4.22 we noticed that the custom component parameter “Control Type: Image” (https://theme.co/docs/parameters#control-types-image) does not return the same type of value as before.

Before, it was returning the URL of the selected image, now it’s returning id:thumb-size for the selected image.

Sample setup:

{
    "setup" : {
        "type" : "group",
        "label" : "Setup",
        "params" : {

            "cover" : {
                "label" : "Cover",
                "type" : "image",
                "initial" : "",
                "height" : 3
            }

        }
    }
}

Using: {{dc:p:setup.cover}}
should return the full path to the image – at least, that is how it was until now (e.g. Cornerstone v7.4. 11 ).

E.g.:
https://domain.com/path-to-image/image.jpg

Not in the Cornerstone v7.4. 22, which will output ID:thumb-size

E.g.:
11206:full

If {{dc:p:setup.cover}} is used in the Source of the e.g. Cornerstone Image component that is not such a big issue since it will display the image (not in the Source thumb where is going to be missing) since ID:thumb-size is the expected input for that component.

The problem is if {{dc:p:setup.cover}} is used in situations where it is expected to get the full URL, e.g. the input parameter of the shortcode that expects to get the URL of the image (the way the Cornerstone worked till now)

E.g.
[some_component cover=”{{dc:p:setup.cover}}”]

We have a lot of custom components set up like that on live sites.

How can we fix that so we can get the URL of the image again?

Looking forward to hearing from you.

Kind regards

Add in type="image" to your Dynamic Content. So in other words [some_component cover="{{dc:p:setup.cover type='image'}}"]. It ended up being problematic for users who wanted to reference the attachment ID directly to always return a URL. Which is why we went back to just returning the attachment ID. Let us know if this helps and have a great day.

Hi @charlie ,

That was it. It’s working now.

Thank you!

Where is that piece of information in the documentation? So I know for the next time. I was looking for it for some time.

Could that information be included in the documentation for Parameters > “Control Types: Image”?

1 Like

Hey @dasbios,

I will confirm with our development team if that is necessary going forward. If so, we’ll add it in our doc.

Thanks.

Hey @dasbios,

It’s now added in our Image Parameter doc https://theme.co/docs/parameters#control-types-image

Hi, @christian,

Great! Thank you!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.