Problem/Motivation

If your site is using revisions for menu item links (for example for use with workspaces), then you can get into a situation:

TypeError: array_diff_key(): Argument #1 ($array) must be of type array, false given in array_diff_key() (line 302 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).

Drupal\Core\Entity\EntityStorageBase->loadMultiple() (Line: 77)
Drupal\group_content_menu\GroupContentMenuParentFormSelector->getMenuOptions() (Line: 58)
Drupal\group_content_menu\GroupContentMenuParentFormSelector->parentSelectElement() (Line: 104)

Steps to reproduce

  • Enable revision support for menu item links
  • Edit any group content menu to add a link
  • Before saving the menu link select a parent link in the Parent link select at the top right of the form
  • Result in above error

Proposed resolution

See patch

Remaining tasks

User interface changes

API changes

Data model changes

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

heddn created an issue. See original summary.

heddn credited s_leu.

heddn’s picture

Status: Active » Needs review

Special thanks got @s_leu for reporting this issue in slack.

s_leu’s picture

Thanks for writing up the issue @heddn. I can confirm the changes are resolving the fatal errors, but I guess we should wait for others before marking it as RTBC.

  • heddn committed a2045817 on 3.0.x
    Issue #3484197 by heddn, s_leu: ParentFormSelector Fatal
    
heddn’s picture

Status: Needs review » Fixed

LGTM

  • heddn committed 60f996bc on 2.0.x
    Issue #3484197 by heddn, s_leu: ParentFormSelector Fatal
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.