- Issue created by @Rudi Teschner
-
Rudi Teschner →
authored de449716 on 8.x-1.x
Issue #3351525 by Rudi Teschner: Notice: Undefined index in...
-
Rudi Teschner →
authored de449716 on 8.x-1.x
- Status changed to Fixed
over 1 year ago 11:33pm 18 May 2023 - 🇳🇿New Zealand jlscott
@Rudi Teschner: Thanks for picking this up and for the patch. I have accepted and committed the patch.
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
over 1 year ago 8:19am 14 June 2023 - 🇩🇪Germany Rudi Teschner
I fear the patch I suggested was just handling the error, but not dealing with the origin of the problem.
I have fields where changes need to be tracked and they are listed in $attached_fields. So far, so good.
But while looping through $attached_fields they are missing from $field_definitions in function user_history_create_user_history and therefore cannot be dealt with// Get a list of fields attached to the user_history entity. $field_definitions = \Drupal::service('entity_field.manager')->getFieldDefinitions('user_history', 'user_history');
The patch above deals with the error. But the problem is that the field_definitions should be made available at this point so that the values can be tracked.
Has this worked for fields added via field api before?
- 🇩🇪Germany Rudi Teschner
My mistake. I forgot to initialise the user_history database via user_history/update :)