Problem/Motivation

Not sure how the content got into this state but format is nullable but the storage is required to load it leading to a fatal error for some edge cases.

Steps to reproduce

I'm not sure if there's a UI way to reproduce this yet or if it requires additional modules or manual changes.

Proposed resolution

My expectation is that if the format is not set, the rest of this function doesn't care about the field and just skip any additional loading.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

neclimdul created an issue. See original summary.

neclimdul changed the visibility of the branch config_install_fatal to hidden.

neclimdul’s picture

Status: Active » Reviewed & tested by the community

Merge request with simple fix.

salmonek’s picture

I couldn't nullify format with UI too.
When nullified directly in code I got only a warning, not fatal.

Warning: array_flip(): Can only flip string and integer values, entry skipped in Drupal\Core\Entity\EntityStorageBase->loadMultiple() (line 279 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).

The patch looks good, so we'll go with it in the next release.

neclimdul’s picture

you probably need assertions enabled to trigger it.

AssertionError: Cannot load the "editor" entity with NULL ID. in assert() (line 261 of /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php).

#0 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(261): assert(false, 'Cannot load the...')
#1 /var/www/html/web/modules/contrib/ckeditor5_premium_features/modules/ckeditor5_premium_features_productivity_pack/ckeditor5_premium_features_productivity_pack.module(89): Drupal\Core\Entity\EntityStorageBase->load(NULL)
#2 [internal function]: ckeditor5_premium_features_productivity_pack_preprocess_field(Array, 'field', Array)
....

  • salmonek committed 4e349670 on 1.6.x
    [#3552434] feat: Fatal error rendering content with empty format
    
salmonek’s picture

Released in 1.6.3

salmonek’s picture

Status: Reviewed & tested by the community » Fixed

Released in 1.6.3

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.