Warning: Undefined array key "#links" error when logged out

Created on 1 November 2023, about 1 year ago
Updated 18 November 2023, about 1 year ago

Problem/Motivation

After installing Navigation on a new Drupal 10 install when I logout I get the following error message.

Warning: Undefined array key "#links" in Drupal\navigation\Plugin\Navigation\NavigationBookmarks->getMenuItems() (line 29 of modules/contrib/navigation/src/Plugin/Navigation/NavigationBookmarks.php).

Steps to reproduce

  1. Create new install of Drupal 10
  2. Enable Navigation module
  3. Logout and reload home page

Proposed resolution

Do a check to see if someone is logged before moving on.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇺🇸United States johnpicozzi Providence, RI

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

Merge Requests

Comments & Activities

  • Pipeline finished with Skipped
    about 1 year ago
    #36194
  • Issue created by @johnpicozzi
  • Assigned to Shreya_98
  • Issue was unassigned.
  • 🇮🇳India Shreya_98

    Hi @johnpicozzi,
    I have fixed this issue . kindly review the patch file .

  • 🇺🇸United States johnpicozzi Providence, RI

    @Shreya_th Couldn't apply the patch via composer.

  • 🇺🇸United States johnpicozzi Providence, RI
  • Status changed to Needs work about 1 year ago
  • 🇪🇸Spain ckrina Barcelona

    Thanks for the work on this! While you are making the above changes, we recommend that you convert this patch to a merge request . Merge requests are preferred over patches, plus we will,be able to test it with the Live Preview on the issue. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other improvements is not recommended and will not receive credit.)

  • 🇺🇸United States johnpicozzi Providence, RI

    This issue may be resolved with the latest dev release. I will test again in the original environment and then close if that is the case.

  • Assigned to johnpicozzi
  • 🇺🇸United States johnpicozzi Providence, RI
  • Issue was unassigned.
  • 🇺🇸United States johnpicozzi Providence, RI

    I'm still having this issue on my local. My above comment was based on a SimplyTest environment. The patch above doesn't apply cleanly and based on my review looks like it need some re-working. I'm not 100% sure the best way to apply an if statement to this code. I did create a fork to move this work into the GitLab workflow.

  • Status changed to Needs review about 1 year ago
  • 🇺🇸United States johnpicozzi Providence, RI

    Created a merge request to resolve this issue.

    Also @ctrladel should get credit also because he helped with the code edits over my shoulder at NEDCamp.

  • 🇺🇸United States ctrladel North Carolina, USA

    Confirming me and John worked on this at NEDCamp contrib day.

  • Status changed to Fixed about 1 year ago
  • 🇪🇸Spain ckrina Barcelona

    Merged, thanks for the work!

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

  • Pipeline finished with Success
    9 months ago
    Total: 164s
    #95027
  • Pipeline finished with Success
    9 months ago
    Total: 192s
    #95036
  • Pipeline finished with Success
    9 months ago
    Total: 91s
    #95054
  • Pipeline finished with Success
    9 months ago
    #95057
  • Pipeline finished with Success
    9 months ago
    Total: 179s
    #95065
  • Pipeline finished with Failed
    8 months ago
    Total: 1127s
    #139005
  • Pipeline finished with Success
    8 months ago
    #139386
  • Pipeline finished with Success
    8 months ago
    #139451
  • Pipeline finished with Canceled
    7 months ago
    Total: 6674s
    #148018
  • Pipeline finished with Success
    7 months ago
    Total: 993s
    #149937
  • Pipeline finished with Success
    7 months ago
    Total: 782s
    #150255
  • Pipeline finished with Skipped
    7 months ago
    #154149
  • Pipeline finished with Failed
    7 months ago
    Total: 457s
    #156059
  • Pipeline finished with Failed
    7 months ago
    Total: 465s
    #156127
  • Pipeline finished with Failed
    7 months ago
    Total: 348s
    #157686
  • Pipeline finished with Canceled
    7 months ago
    #157703
  • Pipeline finished with Success
    7 months ago
    #157710
Production build 0.71.5 2024