Slug creation of nested object not working

Here’s my use case…

I have a locations page which is its own schema. Nested in that schema is a “type-location” schema that can handle multiple locations. These are store locations, FYI.

I have a slug field and am attempting to fill it via create and update scripts on the “type-location” schema when editing the locations page content. The slug field on “locations” (the locations page) works, while the nested component field for “type-location” does not work. No slug is created for it.

I have the script in the create/update of the nested component type instead of referencing it from the parent. “locations” -> “type-locations[]”

Do I just have the script wrong or is this a bug?

Thanks for your help!

I elected to use an embedded reference instead of embedded content. This allowed the existing scripts to work on the non-nested schema.

1 Like

Yes, the scripts do not work for components at the moment.