Found while restoring a page on a live account (see #347 for how it came to need restoring).
The rejection
The content that had been live for weeks — a landingPage whose sections are exactly RichText at $position 0 and ElectroluxServices at $position 1 — cannot be committed back:
POST api/content-platform/manage/{account}/{store}/branches/main/commits
-> 400 {"error":{"code":"VALIDATION_ERROR","message":"Data is not valid, please check your input."}}
Bisected on a scratch entry, same seo and slug each time, only sections.values varying:
sections |
result |
{} (empty) |
✓ commit |
RichText alone |
✓ commit |
ElectroluxServices alone |
✓ commit |
RichText + ElectroluxServices |
✗ VALIDATION_ERROR |
BannerFull + ElectroluxServices + SplitPromo ×2 + ElectroluxServices + ContactChannels (6 sections, no RichText) |
✓ commit |
So it is not the section count — six commit fine. It is RichText in the presence of any sibling. Both forms of seo (plain scalars, and the $fnType: "switch" locale envelope) behave identically, so the envelope is not the trigger.
The published content type has no constraint that would explain it: landingPage.required is [], sections is {"type": "array", "uniqueItems": false} with no minItems/maxItems, and RichText is in the anyOf whitelist. Diffing the published schema at the version that accepted this content against the current one shows the landingPage content type is byte-identical apart from two newly whitelisted sections.
The part parity can fix
Whatever the platform is doing, the error is unactionable. {"code":"VALIDATION_ERROR","message":"Data is not valid, please check your input."} is the entire body — no path, no field, no offending section. It took ~15 commits against a scratch entry to narrow it to one section key.
push already holds both the payload and the published schema (doctor fetches the content types). It could validate locally before POSTing and name the section and property that fails:
✗ sections[0] RichText: <what is wrong>
the account would reject this commit — nothing was written
Even a plain JSON-Schema pass over content-types/{ct} would have turned a long bisect into one line. Related: #344 (doctor should compare properties, not just section keys).
Repro
export PARITY_CMS_ACCOUNT=<acct> PARITY_CMS_STORE=<store>
parity cms pull --content-type landingPage --entry <any> --branch <b> --out e.json
# leave one RichText plus any other section in data.sections.values
parity cms push --file e.json --yes
Found while restoring a page on a live account (see #347 for how it came to need restoring).
The rejection
The content that had been live for weeks — a
landingPagewhosesectionsare exactlyRichTextat$position 0andElectroluxServicesat$position 1— cannot be committed back:Bisected on a scratch entry, same
seoandslugeach time, onlysections.valuesvarying:sections{}(empty)RichTextaloneElectroluxServicesaloneRichText+ElectroluxServicesVALIDATION_ERRORBannerFull+ElectroluxServices+SplitPromo×2 +ElectroluxServices+ContactChannels(6 sections, no RichText)So it is not the section count — six commit fine. It is
RichTextin the presence of any sibling. Both forms ofseo(plain scalars, and the$fnType: "switch"locale envelope) behave identically, so the envelope is not the trigger.The published content type has no constraint that would explain it:
landingPage.requiredis[],sectionsis{"type": "array", "uniqueItems": false}with nominItems/maxItems, andRichTextis in theanyOfwhitelist. Diffing the published schema at the version that accepted this content against the current one shows thelandingPagecontent type is byte-identical apart from two newly whitelisted sections.The part parity can fix
Whatever the platform is doing, the error is unactionable.
{"code":"VALIDATION_ERROR","message":"Data is not valid, please check your input."}is the entire body — no path, no field, no offending section. It took ~15 commits against a scratch entry to narrow it to one section key.pushalready holds both the payload and the published schema (doctorfetches the content types). It could validate locally before POSTing and name the section and property that fails:Even a plain JSON-Schema pass over
content-types/{ct}would have turned a long bisect into one line. Related: #344 (doctor should compare properties, not just section keys).Repro