Repository navigation
fix(export): an empty title or empty required ACF field no longer fails the export; the message names model.field (0.8.3) - #70
Merged
Conversation
…ls the export; the message names model.field (0.8.3) A title-less record gets a label from its slug or id, counted per model in bridge/warnings.json. An empty required field (ACF does not hold drafts, private posts or older rows to it) is left out, becomes optional in the model and is named in the warnings. No record is dropped. The post title's '#id' fallback moves into Models::entry().
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.
What
A remote export failed with
Required content value is empty.and no model or field named. WordPress saves records this validator refused:The fix is one place,
Models::entry(), which every record passes through:source_slug→#<wp_id>→#<ref>→ the model name. Counted per model inbridge/warnings.json(empty-title-derived: N record(s) …). The title field stays required.model/<id>.<field>:required-value-empty …).Models::model()keeps a relaxed field optional for later records, so a re-declaration does not raise "Inconsistent field types".model.field (locale), like its sibling throws. It stays fail-closed for anything else.No record is dropped: menu parents, ACF relations and post→author/term/media point at rows by id, and a dropped row would fail as a missing relation one step later.
GENERIC. The trigger is WordPress's own data shape: a title-less record, and ACF's unenforced required on drafts and private posts. It does not depend on any one site. Census: not counted. Only one stored Bridge export is on disk, with 6 attachments and 0 untitled; the goldens have no stored Bridge models with ACF required values.
Superseded / removed
'#' . idfallback inModels::post()moves intoModels::entry(). An untitled post's label is now its slug when it has one, otherwise#id, matching the export screen'sJobs::name().Migrate impact (none needed)
requiredfrom Bridge models.packages/intake/src/bridge.tsonly counts.contentrain/models/*.json, and migrate writes its own store fields. No migrate test pins a Bridge model'srequired.bridge/warnings.jsonrow becomes a string inintake-summary.jsonwarnings, never a failure. This is already covered bypackages/intake/tests/bridge.test.ts, the case "kök okuma notu kabul edilir ama alınmaz; uyarılar ve kapsam özete geçer". The new rows have the same{source, reason}shape.Tests (functional)
tests/integration.php:#<id>, and the derived labels are counted;model.excerpt (locale).Gate (local, clean stack)
composer lint0/0 on 28 files.test:wordpress: 427 checks (was 420) plus 11 WPML checks.test:store55-file byte parity,test:text,test:coverage,npm test(handoff): all pass.