State and City fields are not appearing when Cardinality is -1.

Created on 16 February 2022, over 2 years ago
Updated 5 April 2024, 3 months ago

Problem/Motivation

When I create a Country city state field with Cardinality -1 state and city field not appearing after selecting counrty.

Steps to reproduce

  1. Add a new country state city field in any content type.
  2. Set the Cardinality of the field is -1.
  3. Add a new content and select the country. The state and city field will not appear.

Proposed resolution

/docroot/modules/contrib/country_state_city/src/Plugin/Field/FieldWidget/CountryStateCityWidget.php
Need to remove below condition in code:
if ($this->fieldDefinition->getFieldStorageDefinition()->getCardinality() == 1) {

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

RTBC

Version

2.1

Component

Code

Created by

🇮🇳India msuthars Pune

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Status changed to RTBC 3 months ago
  • 🇮🇳India sheetal-wish Indore

    I have reviewed and implemented changes as per patch. Looks fine now.
    Marking this RTBC!!

Production build 0.69.0 2024