Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm getting an error
Warning: array_keys() expects parameter 1 to be array, null given in file_entity_admin_menu_map() (line 2472 of /home/domain/public_html/folder/sites/all/modules/file_entity/file_entity.module).
I initially got a similar error with the non-dev version (on line 2463) and that's why I tried the dev. What is this error and how can it be resolved? Can't hand the site over to a client with an error displaying.
Comments
Comment #2
Dave ReidHrm, the only way this could happen is if there are no file types defined. It looks like we have a small bug in file_entity_type_get_names(), used in file_entity_admin_menu_map(), that could return NULL instead of an empty array. I've resolved it with the commit referenced above.
Could you please try the latest -dev version in a couple of hours?
Comment #4
bdupls CreditAttribution: bdupls commentedI am using latest 7.x-2.0-beta1 and my logs keep showing this error.
Warning: array_keys() expects parameter 1 to be array, null given in file_entity_admin_menu_map() (line 2463 of /home/xxx/modules/contrib/file_entity/file_entity.module).
Not sure how to resolve this.
Comment #5
bethwhitney CreditAttribution: bethwhitney commentedIs it possible for this ticket to be reopened?
I've just installed the latest 7.x-2.0-beta1 version as well, and am getting the exact same error message as above. Was anyone able to resolve the issue? Thanks.
edited to add: I've getting closer to figuring out what may have gone wrong (upgrade and version mis-match)
If anyone else is struggling with this after upgrading from .1 , please see https://www.drupal.org/node/2043499 especially comment #15 https://www.drupal.org/node/2043499#comment-8424719 for the hints on ways to upgrade.
Comment #6
Dave ReidThis has already been fixed and will be included in the next release. This error does not mean anything is wrong, nor is it cause for concern. Once you create a file type, this error will go away.
Comment #7
bethwhitney CreditAttribution: bethwhitney commentedThanks so much Dave.
Comment #8
bdupls CreditAttribution: bdupls commentedEnable document and image at the very least under 'admin/structure/file-types' and error disappears.