concrete/fixtures/property-invalid
A property fails the platform schema, references a missing file, or repeats an id within a list.
A property fails the platform schema, references a missing file, or repeats an id within a list.
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's property is the same shape the platform stores for a real listing, and it is parsed with the platform's own schema — that is what makes a fixture a rehearsal rather than a mock. A property that fails the parse, names a media file that is not there, or repeats an id within one of its lists cannot be resolved into content, so every section that would have rendered over it goes ungraded.
Fix
Read the message: it names the file and the field. A repeated id is the common one —
every upload, unit, contact and comparable is addressed by its id, so two entries of
one list cannot share one. A missing
file is usually a file path that has drifted from the folder: every path is relative to
the property document. A property document can name .concrete/schema/property.schema.json,
which concrete dev writes, as its schema member, and your editor flags a field of the wrong
shape as you type.
Before and after
{
"uploads": [
{ "id": "hero", "kind": "image", "file": "media/deck.jpg", "account": "A photograph of a deck at golden hour." },
{ "id": "hero", "kind": "image", "file": "media/kitchen.jpg", "account": "A photograph of a galley kitchen." }
]
}{
"uploads": [
{ "id": "deck", "kind": "image", "file": "media/deck.jpg", "account": "A photograph of a deck at golden hour." },
{ "id": "kitchen", "kind": "image", "file": "media/kitchen.jpg", "account": "A photograph of a galley kitchen." }
]
}