Layout ID seems to change after updates

I am using Node-Red to give Bar Managers ability to change the Xibo Layouts used depending on what is required.
Everything works perfect but what I’m finding is that when I do an update to the Xibo CMS version, for some reason the layout ID of some of the designs is changing. As an example in CMS v3.1.2 the layout ID might be 239 but after an update to CMS 3.1.3 that exact same layout now has an ID of 246.
I’ve done no other changes other than to update the CMS version.

Because the layout ID number is hard coded in Node-red it then fails to display the correct layout.

Is this something in the CMS update process that is causing this.

The layout ID shouldn’t change across an upgrade, but it will change every time that layout is checked out and published.

If you want a fixed ID to reference that layout, then use the campaignId for that layout which you can get from the layout object, or you can find shown in recent CMS versions on the Layouts page under the ID column. LayoutId which is what you’re using is shown in its own column (Layout ID) which you have to specifically enable to see.

1 Like

Ok got it. Now you mention it I did checkout the layout designs of a few items.
Is there any other way to change the layout of a Display. I was told by support (#039279) to use the LayoutID but didn’t know it’s number always changed so that’s kind of useless in our situation.

At the moment I’m using [​/displaygroup​/{displayGroupId}​/layout​/assign] which appears to be only able to use the LayoutID number.
Would using a call to /displaygroup/{displayGroupId}/action/changeLayout be better, as it appears that it might be able to use campaignId instead which you mention won’t change.

Thanks
Aleka

You use the campaignId to lookup the layoutId and then use that for the other calls.

Been a while but with upgrading to v4 I’m back at it and need help again.
In the CMS there is the option to show LayoutId but how do I find the CampaignID that is used by the layout.
If I do an API call to get the layoutId I can see the campaignId in the response and note that it doesn’t change when checking out/edit/publish layout which is perfect for my hard coded API calls but is there an easy way to find the campaignId from within the CMS?

Thanks
S

It’s just the ID column in the Layouts grid. That is the campaignID. You’ll note it doesn’t change when you checkout/publish. If you need the layout specific ID (which does change) then you add on the Layout ID column to the grid.

Great thanks. It’s all working now.
When I did the API calls in v3 I was told to use the layoutID but the campaignID is better for hard coded calls.
Again thanks for your fast response.
Cheers

It’s the same thing - nothing changed, other than that ID being exposed in the UI by default.