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

Created on 16 February 2022, almost 3 years ago
Updated 5 April 2024, 8 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 8 months ago
  • 🇮🇳India sheetal-wish Indore

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

Production build 0.71.5 2024