Undefined array key "add_more" in Drupal\entityqueue\Plugin\Field\FieldWidget\EntityqueueDragtableWidget::addItemAjax()

Created on 21 September 2023, 9 months ago
Updated 22 September 2023, 9 months ago

Problem/Motivation

When trying to add a entityqueue item to the last position on a limited entity queue, the following php warnings are triggered:

Warning: Undefined array key "add_more" in Drupal\entityqueue\Plugin\Field\FieldWidget\EntityqueueDragtableWidget::addItemAjax() (line 339 of /var/www/html/web/modules/contrib/entityqueue/src/Plugin/Field/FieldWidget/EntityqueueDragtableWidget.php)

Warning: Trying to access array offset on value of type null in Drupal\entityqueue\Plugin\Field\FieldWidget\EntityqueueDragtableWidget::addItemAjax() (line 339 of /var/www/html/web/modules/contrib/entityqueue/src/Plugin/Field/FieldWidget/EntityqueueDragtableWidget.php)

Steps to reproduce

Add a limited entityqueue and set all items, at the last position the warnings are triggered.

Proposed resolution

Check that 'add_more' element is set.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡΅πŸ‡ΉPortugal joao.ramos

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

Comments & Activities

Production build 0.69.0 2024