"hide_logo" is an invalid render array key.

Created on 20 October 2024, 6 months ago

Problem/Motivation

InvalidArgumentException: "hide_logo" is an invalid render array key. Value should be an array but got a boolean. in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).

Steps to reproduce

Install This module, run drush updb and clear the cache.

Going from beta 1 to Beta 3:

drush updb
 ------------ -------------- ------------- ------------------------------------
  Module       Update ID      Type          Description
 ------------ -------------- ------------- ------------------------------------
  navigation   set_logo_dim   post-update   Defines the values for the default
               ensions_defa                 logo dimensions.
               ult
  navigation   update_permi   post-update   Grants navigation specific
               ssions                       permission to roles with access to
                                            any layout.
 ------------ -------------- ------------- ------------------------------------

gives out a fatal PHP error:

InvalidArgumentException: "hide_logo" is an invalid render array key. Value should be an array but got a boolean. in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).

Quick fix

  1. Uninstall this module and the Navigation module
  2. Reinstall the Navigation module

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada xmacinfo Canada

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

Comments & Activities

  • Issue created by @xmacinfo
  • 🇨🇦Canada xmacinfo Canada

    The previous error may be due to having the contrib version of Navigation loaded on an old install of Navigation Extra Tools, which fixed the dependency in a never beta release.

  • 🇮🇪Ireland lostcarpark

    I've checked the navigation_extra_tools source, and confirmed hide_logo does not appear anywhere within the module.

    As @xmacinfo points out, this appears to be caused about the contrib version of the Navigation module being installed when Beta1/2 was installed with Composer.

    The release notes for Beta3 recommend uninstalling the Navigation module prior to updating.

    This issue should only affect users who installed beta1 or 2 upgrading to beta3. As the gap from beta1 to beta3 was less than 24 hours, I'm hoping that's a relatively small userbase.

  • 🇮🇪Ireland lostcarpark

    I'm moving to closed as I don't think there is a solution other than uninstall and reinstall Navigation.

Production build 0.71.5 2024