Content type bundles aren't persisted

Created on 3 August 2025, 2 months ago

Problem/Motivation

When adding (or editing) an API entity, the form does not persist the bundles chosen. This is apparent when the Entity type option is Content.

Steps to reproduce

Add or editing an API entity at /admin/structure/mastodon-api-entity, fill in the form, choose Content for Entity type. On a clean install of Drupal, you will have options for Article and Page, tick one, or both. Save the form. Edit the API entity again and observe that the Article and Page are not ticked.

Proposed resolution

Change the form definition of bundles_container from:

'#tree' => TRUE

to

'#tree' => FALSE

Remaining tasks

Create an issue fork.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom matason

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024