concrete/fixtures/document-invalid
A fixture document does not parse, or does not match the template: an unknown key, slot or field, a value of the wrong kind, a sourced slot stated without its override mark, or one instance stated twice.
A fixture document does not parse, or does not match the template: an unknown key, slot or field, a value of the wrong kind, a sourced slot stated without its override mark, or one instance stated twice.
Graded by the fixtures stage of concrete check, in the tree venue. A violation reports this id and the file it failed at — see every rule and concrete check.
Reason
A fixture is a document no compiler reads, so concrete check grades it against the
template: each instance id is one the pages place, each slot is
one its section declares, and each value is the kind its slot holds. A value that fails is
dropped and the slot renders empty, so the case you meant to preview is not the one on the page.
A sourced slot (a fact, a row's member, a compute() or a mirror) takes its value from the
property. A value stated for one is the user's override of that source, and it counts only
when the instance's slot overrides mark it as the user's, as the app marks an edit (the
after example below).
A property document is graded the same way where it names an upload: a pick states only
{ "media": "<upload id>" }, and a member beside media is reported rather than loaded as if
it were never written.
Fix
Name the instance and the slot as the template declares them, and write the value as the slot
stores it: a string for text, a number for a number, { "media": "<upload id>" } for media. To
override a sourced slot, mark it. Name the schema concrete dev writes,
.concrete/schema/content-fixture.schema.json, as the document's schema member, and your editor
flags each of these as you type. A property document names .concrete/schema/property.schema.json
the same way.
Before and after
{
"property": "properties/riverside/property.json",
"content": {
"hero-1": {
"slots": { "headline": 42, "street": "12 Harbor Lane, Salem", "shot": "deck" }
}
}
}{
"property": "properties/riverside/property.json",
"content": {
"hero-1": {
"slots": { "headline": "A cape by the water", "street": "12 Harbor Lane, Salem", "shot": { "media": "deck" } },
"slot_overrides": { "scalar": { "street": true } }
}
}
}