Warning: strnatcasecmp() expects parameter 2 to be string, array given in admin_menu_element_sort()

Created on 24 May 2019, over 5 years ago
Updated 28 June 2024, 5 months ago

Drupal started to give lots of:

Warning: strnatcasecmp() expects parameter 2 to be string, array given in admin_menu_element_sort() (line 736 of ../sites/default/modules/admin_menu/admin_menu.module).

after views module updated to 3.21.

Also menu item to clear cache of views no longer visible in admin menu.

🐛 Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India junaidpv Kannur, Kerala

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia klonos 90% Melbourne, Australia - 10% Larissa, Greece

    I have tested this on D7.94 (and Views 7.x-3.28 FWIW), where previously I would get these 4 warnings (after for example clearing caches):

    Warning: strnatcasecmp() expects parameter 1 to be string, array given in admin_menu_element_sort() (line 733 of /app/sites/all/modules/admin_menu/admin_menu.module).
    Warning: strnatcasecmp() expects parameter 2 to be string, array given in admin_menu_element_sort() (line 733 of /app/sites/all/modules/admin_menu/admin_menu.module).
    Warning: strnatcasecmp() expects parameter 1 to be string, array given in admin_menu_element_sort() (line 733 of /app/sites/all/modules/admin_menu/admin_menu.module).
    Notice: Array to string conversion in check_plain() (line 1908 of /app/includes/bootstrap.inc).
    

    After applying the patch from the MR via via https://git.drupalcode.org/project/helper/-/merge_requests/1.patch all these warnings/notices go away.

    The code does exactly what the maintainer of the module suggested in #5, so RTBC 👍

  • 🇩🇪Germany Anybody Porta Westfalica

    Any chance to get this committed and released?

    The issue still exists... just ran into this again. RTBC since > 1y

  • 🇩🇪Germany Anybody Porta Westfalica

    @Dave Reid still running into this 5 years after the report. Any chance to merge this and tag a new release? ;D

Production build 0.71.5 2024