Compatibility issue with Address module

Created on 10 December 2023, 12 months ago
Updated 17 January 2024, 10 months ago

Problem/Motivation

The address contrib module , in the AddressItem field type, is declaring a "Country" constraint and giving a "availableCountries" option which they collide with the change in #3382101 🐛 Add support for Symfony Country Constraint Fixed and provoking the following error :

Symfony\Component\Validator\Exception\InvalidOptionsException: The options "availableCountries" do not exist in constraint "Drupal\field_validation\Plugin\Validation\Constraint\CountryConstraint". in Symfony\Component\Validator\Constraint->normalizeOptions() (line 180 of /app/vendor/symfony/validator/Constraint.php).

Steps to reproduce

  1. Clean D10 install
  2. Install and enable both Address & Field Validation modules
  3. Add an "address" field to a content type
  4. Create a new content type and try to validate the form

Proposed resolution

Change the "CountryConstraint" plugin ID to avoid collisions with Address module.

Remaining tasks

Review patch.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇧🇪Belgium oldeb Namur 🇧🇪

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024