Skip to content

cmsLocaleId is mandatory #223

@tobyt42

Description

@tobyt42

Hi,

I'm trying to switch to the new API, but getting a validation error when trying to patch an item

statusCode: 400,
  body: {
    message: `Validation Error: ["Value (cmsLocaleId)'s type should be string"]`,
    code: 'validation_error',
    externalReference: null,
    details: []
  }

The code used for patching the item is pretty simple:

      const newItem = {
        ...oldItem,
        isArchived: false,
        isDraft: false,
        fieldData,
      };

      await client.collections.items.updateItemLive(
          collectionID,
          newItem.id,
          newItem
        );

oldItem is retrieved via webflow API and does not contain cmsLocaleId.

According to API docs at https://developers.webflow.com/v2.0.0/data/reference/cms/collection-items/live-items/update-items-live this parameter should be optional. Could you help please?

I have seen this issue with v2.4.2 and on the latest version 3.1.0

I explored setting the cmsLocaleId value to the primary locale, but locales on the site object (https://developers.webflow.com/v2.0.0/data/reference/sites/get) is undefined.
I only have API access to this webflow site, so I don't know what settings there are in the UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions