Repository navigation
fix(cms): fill a Webflow collection's date field with the day a page is first sent - #1600
Merged
Merged
Conversation
…is first sent
A Webflow blog template often requires a Date field. Send to CMS didn't
fill it, so the field map refused such a collection ("The collection
requires Date, which Send to CMS doesn't fill").
- A new part, `date`, goes to a DateTime field and counts as always
filled.
- A new item is given the day it's sent (ISO 8601). One sent again keeps
its own date, as a blog's publish date.
- Webflow's own dates (created-on, updated-on, published-on) can't be
mapped.
- The date is suggested only for a date field the collection requires:
the one that reads as a date, else its only one.
- Settings › Integrations shows the row, with a line on what goes there.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 of 12 tasks
gkhngyk
approved these changes
Oct 27, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good, with follow-ups.
What I checked:
- Own change. One commit on 5bbd162, the commit before #1593. It merges clean on main (15b5b5f) and with #1601. With both, the card,
en.jsonand the card test merge without a conflict and the card test passes (20). - Webflow's field type and value.
- Webflow's API v2 calls a date field
DateTime, and it takes an ISO 8601 string.sentAt.toISOString()gives one in UTC with aZ, e.g.2026-10-27T09:30:00.000Z. - Sending the moment, not a bare day at midnight UTC, is the right call. Webflow keeps the instant, and a template shows it in the site's own time zone. So the day shown is the site's day when the page was sent. A midnight-UTC date would show the day before on a site west of UTC.
created-on,updated-onandpublished-onare kept out of the map (OWN_FIELDS), on top ofgetCollectiondropping fields that aren't editable.
- Webflow's API v2 calls a date field
- First send vs. a send again (
webflow-delivery.js:71,:81).- An update sends the fields without the date, so an item keeps its own (Webflow's PATCH leaves out fields as they are).
- A new item, and an item made again after it was deleted in Webflow, get the date. Both are tested.
- The suggestion and the check.
- The date is suggested only for a required
DateTime: the one named publish / date / posted, else the only one. Two required dates with neither named as a date are left to the person. checkFieldMaptakesdateonly on aDateTime, and a required date mapped to it no longer refuses the collection. Unmapped, it still does, with the same message.- The hint regexes are short and fixed, on a slug plus a name: nothing slow there.
- The date is suggested only for a required
- Web.
WEBFLOW_PARTSandWEBFLOW_PART_TYPESgaindate. The card's row, picker filter, problem labels andfittingall read from them, so the row needs nothing else.parts.dateanddateHintare inen.json. - Tests. Server: the 89 tests in
src/lib/cms/,routes/cms.test.jsandcontent-delivery.test.jspass. With main'swebflow.js,webflow-items.jsandwebflow-delivery.js, the four new tests fail and the rest pass. Web: the card and client tests pass (21). With main's card, client anden.json, the new card test fails. CI's web job doesn't run web tests. - Before the API deploy. The web shows the Date row at once, but the API on prod doesn't know the part yet. It still refuses a collection that requires a date, with today's message, and drops a mapped optional date on save. Nothing that works today breaks. The Date row works once the API is deployed.
Follow-ups:
- Pages sent before the date was mapped stay undated (
webflow-delivery.js:71). A brand that maps an optional date, or makes its date required in Webflow later, keeps an empty date on every item sent before. A send again leaves it empty. If that shows up, fill the date on an update only when the item has none.getItemalready reads the item's fields. - Merge with the Framer server PR (#1576, and #1579 on top of it). Both edit the end of
fieldDataForinwebflow-items.js. #1576 moves the JSON-LD intojsonLdText. Whichever merges second keeps both:jsonLdTextfor the JSON-LD, and the date line after it.
4 of 12 tasks
This was referenced Oct 28, 2026
gkhngyk
added a commit
that referenced
this pull request
Oct 28, 2026
* fix(cms): give a Webflow item sent again a date when it has none Follow-up from #1600 (item 1). Only a new item was given the day it's sent; an item sent again kept its date. So a brand that maps an optional date later, or makes its date required in Webflow, kept an empty date on every item sent before, and a send again left it empty. When the field map gives a date, sendToWebflow now reads the item before updating it (getItem, which says which fields hold a value) and, when its date is empty, sends today's with the update. An item that can't be read is updated without a date, as before; without a date field nothing is read. The Send to CMS guide's field table lists the Date field (#1507's follow-up) and says an item sent again keeps its date, or gets one. fieldDataFor (webflow-items.js) is unchanged, so this doesn't meet the Framer PRs' edit at its end (#1576, #1579). Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(cms): say which Webflow items are given the day they're sent Review follow-up. The comment above createItem still said only a new item is given the day it's sent, but an item sent again with an empty date now gets it too. It names both now. Comment only; webflow-items.js untouched. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(cms): keep a Webflow item's date when the read didn't see its fields --------- Co-authored-by: Cihan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Gökhan Geyik <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Send to CMS fills a Webflow collection's date field. Ansvisor's own Webflow blog collection ("Blog Posts") requires a Date field. Send to CMS didn't fill one, so Settings › Integrations refused the collection:
Many Webflow blog templates have such a required date.
date(server/src/lib/cms/webflow.js):DateTimefield;ALWAYS_FILLED), so a required date mapped to it no longer refuses the collection;webflow-items.js,webflow-delivery.js):created-on,updated-on,published-on) can't be mapped (OWN_FIELDS).getCollectionalready left them out.The settings card is also touched by #1593 (token steps) and the set-up badge PR, on different lines. Whichever merges second may need a small merge of
webflow-card.tsxanden.json.Related issue
Part of #1331 (Send to CMS), found in Ansvisor's own live Webflow set-up.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
cd server && npx vitest run src/lib/cms/webflow.test.js src/lib/cms/webflow-items.test.js src/lib/cms/webflow-delivery.test.jscd web && yarn vitest run src/components/settings/webflow-card.test.tsx src/lib/webflow-client.test.tsChecked in the browser at 1024 px, light and dark. This server has no Webflow set up, so the card's reads were stubbed in the page: a connected site, and a "Blog Posts" collection with a required rich text, an optional summary and a required Date.
{ body, metaDescription, date }and said "Saved. Pages go to Blog Posts."Worth a look on the first live send: the update relies on Webflow's PATCH leaving out fields untouched. The send already updates items that way.
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Also run:
server/:npm run format,npm run lintandnpm test(2,945 tests);web/:yarn format,yarn lint(0 errors),yarn typecheck,yarn testandyarn build.In the full web run, one Library test that times a long list ("reads a long list's pages fifty at a time") failed under load. Run alone, it passes: 4,139 tests in all.
🤖 Generated with Claude Code