MapItem is broken for configurable fields

Created on 6 September 2015, about 9 years ago
Updated 14 March 2023, over 1 year ago

Problem/Motivation

Creating a configurable MapItem field (or a field-type based on it) fails with:

The website encountered an unexpected error. Please try again later.
Error: Call to a member function isRequired() on null in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->getDedicatedTableSchema() (line 2314 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).

This is because MapItem has a schema column with no corresponding property. This is a violation of the current API, so we need to fix that or change the API, but that is what 🐛 MapItem violates FieldItemInterface::schema()'s contract - breaks widgets Needs work is about. This is about fixing this concrete use-case.

Proposed resolution

Fix the ability to create configurable map fields and add a corresponding test.

🐛 Bug report
Status

Needs work

Version

10.1

Component
Field 

Last updated about 15 hours ago

Created by

heddn Nicaragua

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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.

  • 🇬🇧United Kingdom catch

    This could use the issue summary update to explain the workaround here, what exactly is split into the spin-off issue etc. Code looks OK but it's hard to review what it's actually doing without the wider context.

Production build 0.71.5 2024