Skip to content

Fix config field validation and build for Statamic 6#1

Merged
sylvesterdamgaard merged 2 commits into
mainfrom
fix-build-and-validation
Apr 21, 2026
Merged

Fix config field validation and build for Statamic 6#1
sylvesterdamgaard merged 2 commits into
mainfrom
fix-build-and-validation

Conversation

@sylvesterdamgaard
Copy link
Copy Markdown

@sylvesterdamgaard sylvesterdamgaard commented Apr 21, 2026

Summary

  • Fix validation error: ReverseRelationshipFieldSelect emitted 'input' (Vue 2 pattern) instead of 'update:value' (Statamic 6 Fieldtype API). This caused field: null to be sent in the config payload despite the user selecting or typing a value, triggering a "This field is required" validation error on save.
  • Fix build on fresh install: The @statamic/cms dependency in package.json pointed to the old Statamic 5 path (resources/dist-package). Updated to the Statamic 6 path (packages/cms), so npm run build works after composer install.
  • Rebuild dist assets: Rebuilt resources/dist/ so the fixes ship with the package via Composer without requiring end users to run npm run build.

Test plan

  • Fresh composer install + npm run build completes without errors
  • Add a reverse_relationship field to a blueprint, configure it with a collection and field — save should succeed without validation error
  • Verify the field value persists correctly after save (re-open config panel, value should be preserved)

sylvesterdamgaard and others added 2 commits April 21, 2026 09:33
Update ReverseRelationshipFieldSelect to emit 'update:value' instead of
the Vue 2 'input' event, matching Statamic 6's Fieldtype API. This fixes
the config panel sending field: null despite user input.

Also update the @statamic/cms package path from the old dist-package
location to packages/cms, fixing npm run build on fresh installs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Apply Pint auto-fixes (ordered imports, strict types, unary operators).

Fix tag tests by passing trusted=true to Antlers::parse(), required in
Statamic 6 for tag execution outside of Blade templates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sylvesterdamgaard sylvesterdamgaard merged commit d6dd56a into main Apr 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant