MapItem is broken for configurable fields

Created on 6 September 2015, over 8 years ago
Updated 14 March 2023, about 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 4 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.69.0 2024