Problem/Motivation
When a term level does not exist anymore but there is an old value in the database, then a PHP warning can occur:
Warning: Undefined array key 5 in Drupal\term_level\Plugin\Field\FieldFormatter\TermLevelFormatter->viewElements() (line 34
Steps to reproduce
Add field values with a certain term level, then remove that level. On display the warning will happen.
Proposed resolution
Do not show term level for invalid levels that don't exist anymore.
Remaining tasks
Merge request work.
User interface changes
Invalid term levels will be hidden.
API changes
none
Data model changes
none
Issue fork term_level-3550773
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 #3
klausimerge request ready.
Comment #4
tibezh commentedLooks good, thank you @klausi!
Comment #6
klausiMerged, thanks!