Multiple PHP warnings given when Tab Label is empty

Created on 25 May 2023, over 1 year ago
Updated 31 May 2023, over 1 year ago

Problem/Motivation

When the 'Tab Label' is empty, multiple PHP warnings are given.

Steps to reproduce

  1. Install this module
  2. Add the horizontal tabs field to a content type
  3. Create a new node without adding a tab label

Proposed resolution

The following key/values are not being added to the elements array in: bootstrap_horizontal_tabs\Plugin\Field\FieldFormatter\BootstrapHorizontalTabs::viewElements

'#field_name' => $field_name,
'#field_type' => $this->fieldDefinition->getType(),
'#field_translatable' => $this->fieldDefinition->isTranslatable(),
'#entity_type' => $entity_type,
'#bundle' => $entity->bundle(),
'#is_multiple' => $this->fieldDefinition->getFieldStorageDefinition()->isMultiple(),
'#title' => $this->fieldDefinition->getLabel();
'#label_display' => $this->label;

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mmarler

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

Comments & Activities

Production build 0.71.5 2024