Problem/Motivation

Steps to reproduce
I had this issue when I tried to use this module with the conditional_fields module.
I tried to add some conditional fields to the eventseries entity but failed.
The following error message appears.
The website encountered an unexpected error. Try again later.
AssertionError: Cannot load the "eventseries" entity with NULL ID. in assert() (line 261 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).
Proposed resolution
Validate the entity before loading it.
As the module use the following logic $editing = ($form_state->getBuildInfo()['form_id'] == 'eventseries_' . $entity->bundle() . '_edit_form'); to check if the form operation is editing. We could also update the EventSeriesForm file to check if the entity exists.
if ($editing && $entity->id()) {
$original = $this->storage->loadUnchanged($entity->id());
if ($this->step === 1) {
..........
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| image (4).png | 235.1 KB | joaopauloc.dev |
Issue fork recurring_events-3484209
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
Comment #2
joaopauloc.dev commentedComment #4
joaopauloc.dev commentedComment #5
muriqui commentedComment #7
muriqui commented