Fatal TypeError after enabling new entity types

Created on 19 February 2024, 10 months ago
Updated 9 May 2024, 8 months ago

Problem/Motivation

When saving the list of CiviCRM entities enabled and 'ticking' a new option, the site encounters a fatal error:

    Warning: Trying to access array offset on value of type bool in drupal_schema_field_types() (line 7388 of /home/cividev/buildkit/build/dmaster/web/includes/common.inc).
    Warning: foreach() argument must be of type array|object, null given in drupal_schema_field_types() (line 7388 of /home/cividev/buildkit/build/dmaster/web/includes/common.inc).
    Warning: Trying to access array offset on value of type bool in drupal_schema_fields_sql() (line 7408 of /home/cividev/buildkit/build/dmaster/web/includes/common.inc).
    TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 7408 of /home/cividev/buildkit/build/dmaster/web/includes/common.inc).

It is then not possible to do anything on the site, including clearing the caches.

You need to manually clear truncate 'cache' table to make the site work again.

Steps to reproduce

From a fresh installation:
- Go to the entity configuration list
- Un-tick 'Activity'
- Tick 'Activity'
- Save configuration
- View the site homepage - it's broken

πŸ› Bug report
Status

Fixed

Version

2.4

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom jkingsnorth

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

Comments & Activities

Production build 0.71.5 2024