Problem/Motivation

EntitySubqueue::getItemPosition() triggers "Undefined array key target_id" PHP warning

Warning: Undefined array key "target_id" in Drupal\entityqueue\Entity\EntitySubqueue->@closure:Drupal\entityqueue\Entity\EntitySubqueue::getItemPosition():319() (line 320 of /var/www/html/web/modules/contrib/entityqueue/src/Entity/EntitySubqueue.php) [9cc84d85-1237-4106-a390-25fba2cdaf3b] #0 /var/www/html/web/modules/contrib/entityqueue/src/Entity/EntitySubqueue.php(320): Drupal\error_page\ErrorPageErrorHandler::handleError() #1 [internal function]: Drupal\entityqueue\Entity\EntitySubqueue->@closure:Drupal\entityqueue\Entity\EntitySubqueue::getItemPosition():319() #2 /var/www/html/web/modules/contrib/entityqueue/src/Entity/EntitySubqueue.php(319): array_map() #3 /var/www/html/web/modules/contrib/entityqueue/src/Entity/EntitySubqueue.php(311):

Steps to reproduce

Add an element to the queue.

Command icon 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

alorenc created an issue. See original summary.

alorenc’s picture

Assigned: alorenc » Unassigned
Status: Active » Needs review
peri22’s picture

I checked this against the '8.x-1.x' branch. The pipeline is completely green and there are no conflicts, so everything looks good to go. Marking RTBC!

peri22’s picture

Status: Needs review » Reviewed & tested by the community

amateescu made their first commit to this issue’s fork.

  • amateescu committed 5b6986e5 on 8.x-1.x authored by alorenc
    fix: #3618249 EntitySubqueue::getItemPosition() triggers "Undefined...
amateescu’s picture

Version: 8.x-1.12 » 8.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

Added a test and merged into 8.x-1.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

amateescu changed the visibility of the branch 3618249-entitysubqueuegetitemposition-triggers-undefined to hidden.