Single-link and multiple-link fields already accept draft records, but they don’t accept unpublished records. This means scheduled publishing only partly works for editors who manage curated content.
Use case
Our client, a news site, uses curated blocks where editors pick articles by hand. Examples are a featured section on the start page or a themed collection.
Editors want to prepare everything in advance:
Write an article and schedule it for publishing.
Add it to the relevant curated blocks right away.
When the scheduled time comes, the article goes live and appears in every curated block it was added to, with no manual editing.
Today, step 2 isn’t possible because the article is unpublished until its scheduled time. Editors have to wait until it’s published, then go back and add it to each curated block by hand. That defeats much of the point of scheduling, especially for early-morning or weekend publishing.
Proposed solution
Add an opt-in setting on single-link and multiple-link fields, for example “Allow linking to unpublished records”. When it’s enabled:
Editors can add unpublished records to the field, including scheduled ones.
The published Content Delivery API leaves out unpublished linked records until they’re published.
The preview API includes them, so editors can preview the result.
Once the linked record is published, either manually or by schedule, it shows up automatically with no change needed to the parent record.
We think this would help any editorial team that uses both scheduled publishing and hand-curated content.
Does that help at all? If I’m misunderstanding any of it, could you please link to the URL in question so I can better understand how it’s set up in your project?
You can share it here, or if you want to keep it private, please DM me or email us at support@datocms.com with the details.
I spoke to Erik over email and got more clarifications about this, so I’m amending this feature request.
Currently
How it works today:
You have a parent record that links to several child records
The parent record is already published, but the child records are updated (i.e., they have been published at least once before, but currently have changes ahead of their published version)
Once you publish the child record(s), the parent record doesn’t change in the CMS — it stays published and doesn’t get a new version — but its API responses get invalidated and updated with the new child record contents
But right now, you cannot publish a parent record if any child is in draft instead of updated status (i.e., the validations won’t let you publish a parent record if any child was never published)
The amended feature request:
Add a new validation option to allow the parent record to be published even if one or more child record(s) are in draft state
Add corresponding validations for on-unpublish
Modify the API responses to hide unpublished children in the default endpoint, but show them in preview mode.
Make sure cache tags are updated accordingly, including for hidden records
Make sure strict mode still works correctly
Make sure downstream components/libraries (react-datocms, structured-text renderer, etc.) continue to work correctly and handle the missing links
Make sure to update documentation about how this affects the frontend
In the meantime, a workaround is to use a simple JSON field instead of a proper Link field to store record IDs and let the frontend handle display rules. Optionally, a plugin like this can improve the JSON field’s UI for easier linking: Better Linking - Plugins — DatoCMS