Hi,

Working with country module, Found minor issue. Selectable countries drop down on both Edit & Field settings tabs while adding field in any content type.

According to Drupal core format while adding new field, after providing label it redirects to field settings and then edit tab. And Field settings page should contain selectable countries drop down not in edit tab.

Example :: If user tries to add List(float) Field. After proving label, it redirects to field settings where user allowed to add Allowed values list then to edit tab.

Regards,
Harish B

Comments

harish b created an issue. See original summary.

harish b’s picture

Here is the patch that solves the issue.

harish b’s picture

Status: Active » Needs review
dakala’s picture

  1. +++ b/src/Plugin/Field/FieldType/CountryItem.php
    @@ -107,9 +107,6 @@ class CountryItem extends FieldItemBase {
         $settings = $this->getSettings();
    

    Not in use

  2. +++ b/src/Plugin/Field/FieldType/CountryItem.php
    @@ -107,9 +107,6 @@ class CountryItem extends FieldItemBase {
         $settings = $this->getSettings();
    ...
         return $element;
    

    We're returning an empty array.

  3. +++ b/src/Plugin/Field/FieldType/CountryItem.php
    @@ -107,9 +107,6 @@ class CountryItem extends FieldItemBase {
       public function fieldSettingsForm(array $form, FormStateInterface $form_state) {
    

    As you can see from 1. and 2. above, we don't need this method any longer. It should be deleted.

Thanks for reporting and the fix.

dakala’s picture

Status: Needs review » Needs work
manjit.singh’s picture

Status: Needs work » Needs review
StatusFileSize
new1.02 KB

here are the Changes that has been suggested in #4. Please review.

harish b’s picture

Status: Needs review » Reviewed & tested by the community

Hi,

Patch is working properly. Changing status to RTBC.

Regards,
Harish B.

  • dakala committed d15b064 on 8.x-1.x authored by Manjit.Singh
    Issue #2757743 by harish b, Manjit.Singh: Selectable countries Drop down...
dakala’s picture

Version: 8.x-1.0-beta3 » 8.x-1.x-dev
Status: Reviewed & tested by the community » Closed (fixed)