Skip to content

Unable to disable localization for relationship fields. #10322

@SalahAdDin

Description

@SalahAdDin

Bug report

It is impossible to disable localization for relationship fields at collection types.

Describe the bug

When you enable localization for a collection type it enables localization for every field on that collection; we have relationship fields on a particular one, and we don't want those to be localized: they will be ever the same regardless the localized language. So, we go to the content editor and we try to change it, but there is no any option to disable it; we go to the configuration file and we disable the plugin there, it does not change anything on the admin. Also, if you try to prepopulate the page from another language, relationship fields are not prepopulated.

Steps to reproduce the behavior

  1. Enable localization for a collection type with relational fields.
  2. Create/Edit an object from its collection type.
  3. Fill the default language, specially witht the relational fields.
  4. Go to the next language.
  5. See the relational field empty.
  6. Go to the Content type editor and try to disable localization for relationship fields.
  7. See the error: no checkbox to disable it.
  8. Disable the plugin directly on the code.
  9. After refreshing, go to the model and look how localization is still enabled for relationship fields.

Expected behavior

It should be possible to disable localization for relationship fields by the two ways: admin panel and config file.

Screenshots

Record_select-area_20210514211436.mp4

Code snippets

project.settings.json:

    "category": {
      "via": "projects",
      "model": "category",
      "pluginOptions": {
        "i18n": {
          "localized": false
        }
      }
    },
    "tags": {
      "collection": "tag",
      "via": "projects",
      "pluginOptions": {
        "i18n": {
          "localized": false
        }
      }
    },

System

  • Node.js version: v14.16.1
  • NPM version: 6.14.12
  • Strapi version: 3.6.2
  • Database: SQLite
  • Operating system: Deepin 20.2 x86_64

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: enhancementIssue suggesting an enhancement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions