Changing config on type doesn't affect articles

Hi there,
I’ve created a type with 2 slices with the following labels:
Slice 1: Section, Accordion
Slice 2: Section, Static

When I was getting the data, the voice: slice_label is null, but slice_type was: “section” for both.

Then I changed: I removed the first label “Section” (now section is not present anymore in any part of the slice) leaving only:
Slice 1: Accordion
Slice 2: Static

Result: exactly like before.

Then I’ve added a filedset for both slices like the labels, but nothing has changed when I call them back.

Is it a cache issue or what?

Thank you,

Alessandro

PS: I’ve recreated the article every time I’ve done one of the steps mentioned above.

Hi @alessandro.iacovacci. This sounds very strange. To help us sort out what might be happening can you send the following?

  • The JSON code for your slice in each instance
  • The url for your Prismic repo (if you don’t want to share it publically, then you can send it to me in a direct message)
  • How are you querying the document? Are you using the API Browser or is it in your code. If in your code can you share the query that you’re running?

Hi Levi,

Thanks for your reply.

This is what you’ve asked (and more):

JSON:
{

“Main” : {

“title” : {

“type” : “StructuredText”,

“config” : {

“single” : “heading1”,

“label” : “title”,

“placeholder” : “Title”

}

},

“uid” : {

“type” : “UID”,

“config” : {

“label” : “url”

}

},

“summary” : {

“type” : “StructuredText”,

“config” : {

“multi” : “paragraph, preformatted, heading1, heading2, heading3, heading4, heading5, heading6, strong, em, hyperlink, image, embed, list-item, o-list-item, o-list-item”,

“allowTargetBlank” : true,

“label” : “Summary”,

“placeholder” : “A short description of this article”

}

},

“body” : {

“type” : “Slices”,

“fieldset” : “Slice zone”,

“config” : {

“labels” : {

“section” : [ {

“name” : “accordion”,

“display” : “accordion”

} ],

“section_-_static” : [ {

“name” : “static”,

“display” : “static”

} ]

},

“choices” : {

“section” : {

“type” : “Slice”,

“fieldset” : “Accordion”,

“description” : “A section, with accordion effect, of the article with title and text”,

“icon” : “text_fields”,

“display” : “list”,

“non-repeat” : {

“title_accordion” : {

“type” : “StructuredText”,

“config” : {

“single” : “heading1, heading2, heading3, heading4, heading5, heading6”,

“label” : “Section title - accordion”,

“placeholder” : “Title”

}

},

“content_accordion” : {

“type” : “StructuredText”,

“config” : {

“multi” : “paragraph, preformatted, heading1, heading2, heading3, heading4, heading5, heading6, strong, em, hyperlink, image, embed, list-item, o-list-item, o-list-item”,

“allowTargetBlank” : true,

“label” : “Section content - accordion”,

“placeholder” : “Content”

}

}

},

“repeat” : { }

},

“section_-_static” : {

“type” : “Slice”,

“fieldset” : “Static”,

“description” : “A section, always interaly visible, with title and text”,

“icon” : “text_fields”,

“display” : “list”,

“non-repeat” : {

“title_static” : {

“type” : “StructuredText”,

“config” : {

“single” : “heading1, heading2, heading3, heading4, heading5, heading6”,

“label” : “Section title - static”,

“placeholder” : “Title”

}

},

“content_static” : {

“type” : “StructuredText”,

“config” : {

“multi” : “paragraph, preformatted, heading1, heading2, heading3, heading4, heading5, heading6, strong, em, hyperlink, image, embed, list-item, o-list-item, o-list-item”,

“allowTargetBlank” : true,

“label” : “Section content - static”,

“placeholder” : “Content”

}

}

},

“repeat” : { }

}

}

}

}

}

}

image001.png

image002.png

More details are in the email I’ve sent you (private).

Thank you,

Alessandro

@alessandro.iacovacci I haven’t received a private message from you yet. Maybe something went wrong, can you try resending it?

@alessandro.iacovacci When you made changes, recreated the article, and re-ran your queries, did you make sure to update the ref you were using in your query? Because if you kept the same ref every time, then you would always be querying the original content.

The ref is always the latest one, I’ve just doubled check.

Any other ideas?

FYI: this is the data I’m having back

image

From what i understand :
you have defined a custom type
in this custom type you have defined custom slices, and in the definition of the custom slice you have created possible label values (looks like)
Screenshot from 2020-07-03 15-39-24
you have then created a document of this custom type, in that document there are slices.
in the payload extract you showed, there are no slice_labels applied.

have you applied the labels in the document ? a slice with a label applied looks like this:


without label

notice the small “tag” icon next to the name of the slice ?

1 Like

Yeah, that’s it. Now I’ve got the labels.

Thank you.

1 Like