fresh local installation and that is what i've got. any idea?

Notice: Undefined index: name in system_sort_modules_by_info_name() (line 926 of /var/www/drupal-7/modules/system/system.admin.inc).
Notice: Undefined index: name in system_sort_modules_by_info_name() (line 926 of /var/www/drupal-7/modules/system/system.admin.inc).
Notice: Undefined index: name in system_sort_modules_by_info_name() (line 926 of /var/www/drupal-7/modules/system/system.admin.inc).
Notice: Undefined index: name in _system_modules_build_row() (line 959 of /var/www/drupal-7/modules/system/system.admin.inc).Notice: Undefined index: name in system_sort_modules_by_info_name() (line 926 of /var/www/drupal-7/modules/system/system.admin.inc).
Notice: Undefined index: name in system_sort_modules_by_info_name() (line 926 of /var/www/drupal-7/modules/system/system.admin.inc).
Notice: Undefined index: name in system_sort_modules_by_info_name() (line 926 of /var/www/drupal-7/modules/system/system.admin.inc).
Notice: Undefined index: name in _system_modules_build_row() (line 959 of /var/www/drupal-7/modules/system/system.admin.inc).
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

furamag’s picture

How can I reproduce this error? Can you provide URL where you saw this error?

datenrettung’s picture

I've found the evil module.

http://drupal.org/project/libraries, Last updated: October 12, 2010 - 00:12, is the reason for this behaviour

so, it's NOT drupal7!!! sorry.

it's a local installation for testing.

"private" server without url = localhost

ubuntu 10.10
php 5.2
apache2
mariadb

furamag’s picture

Status: Active » Closed (duplicate)

If it's not Drupal 7 bug I think we should close this issue. You can see bug report for that issue on following page - http://drupal.org/node/939174 .

ifernando’s picture

I got the same error.

Check that $Id$ is properly commented with a semicolon (i.e., ;$Id$).

-ds-’s picture

For anyone else coming across this error and ending up here via a search: This error is most likely to do with a custom module, in particular the module.info file.

Make sure you have it correctly formatted and if you have any comments in this file, be sure to use a semicolon at the beginning of comment lines, unlike usual php // comment markers.

RobAlex’s picture

I got essentially the same set of error messages a few days ago with no custom module. I was, however, creating a Genesis sub-theme and did modify the sub-theme's info file. But the error messages persisted after I had disabled both the sub-theme and the Genesis theme. No other files were modified.

Later: I removed the sub-theme instead of just disabling it and the messages went away. So one has to watch one's disabled themes and modules as well as the enabled ones - a surprise to me.

And it was the theme's info file.

svinec’s picture

I also got this error from a theme's .info file. First, I physically removed the theme from the folder (site/all/themes) and the error disappeared. Then, I went on to find out what was the cause. It turned out to be the .info file's encoding. The error appeared when using utf8 encoding. Problem solved (for me) using ANSI encoding.
(using Drupal 7.8)

fabul’s picture

Hi,

I met the same message after my first module was built. I resolved it when I suppressed the tag <?php at the beginning of my module file .info.

I hope this response is usefull.

KJ

r2integrated’s picture

Version: 7.0-beta1 » 7.12
Status: Closed (duplicate) » Needs review

Confirming svinec's findings (#7) - this issue appeared when my *.info file was encoded in UTF8. Changed to ANSI and it works fine. I do not believe, in svinec's and my case, that this is a duplicate of http://drupal.org/node/939174. I'm guessing that file encoding shouldn't affect whether or not a .info file is loaded properly, correct? In case it helps when trying to reproduce the issue, this issue is reproducible with D7.12 on php 5.3.3 running under Windows.

damien_vancouver’s picture

I was seeing this error on my modules list page, caused by an invalid // Id$ line at the top of a module's .info file.

Since it's not obvious which module is causing the problem, here is some debugging code to print out the module causing the error:

  • Backup your database and try this on a development server if at all possible, not your live server.
  • Install and enable the Devel module (needed for the dpm() function used below)
  • make a backup copy of your modules/system/system.admin.inc file, then edit it and search for the line:

    function system_sort_modules_by_info_name($a, $b) {

    (this is line 925 in Drupal 7.12. The error message will also show you the approximate line.)

  • Paste in the debugging code below, immediately after function system_sort_modules_by_info_name($a, $b) {
      // start of debugging code
      if (!isset($a->info['name'])) {
        dpm($a,'a not set');
      } 
      elseif (!isset($b->info['name'])) {
        dpm($b,'b not set');
      } 
      // end of debugging code
    
  • Save, and now visit your Module List page
  • You should see some green Drupal messages at the top of the page, one for each error message you were seeing.
  • Click on the text of each message and it will expand into a tree showing more information (like which module it is).
  • Check the .info file for the module that is triggering the error, and make sure there is no PHP or lines commented with //. (Comments in .info files must begin with ; becuase they are INI file syntax) If you don't see anything wrong, check the encoding is UTF-8, as per #9 above
  • Once you have fixed the problem, remove the debugging code from system.admin.inc or restore your backup copy.
1mik3’s picture

To anyone who finds this from google or whatnot and is not a programmer, for me, i solved this error by deleting all the themes i uploaded and then re-uploading the one i needed and now everything is fixed.

droplet’s picture

Project: Drupal core » Libraries API
Version: 7.12 » 7.x-2.x-dev
Component: base system » Code
Status: Needs review » Closed (duplicate)
r2integrated’s picture

@droplet, please see my post (#9). I'm not sure this should be closed just yet. In my particular use case, I don't believe this is a dupe of 939174.

droplet’s picture

Project: Libraries API » Drupal core
Version: 7.x-2.x-dev » 8.x-dev
Component: Code » base system
Assigned: Unassigned » droplet
Status: Closed (duplicate) » Needs review
Issue tags: +Needs backport to D6, +utf8, +Needs backport to D7, +BOM

Lets test it.

droplet’s picture

FileSize
1.17 KB
774 bytes

forgot attach files

Amit_Webgrity’s picture

I got this errors.How to fix it in drupal7.
Please Help me.
Advance Thanks.

Notice: Undefined index: name in system_sort_modules_by_info_name() (line 944 of E:\wamp\www\cms\drupal\drupal-7.14\modules\system\system.admin.inc).
Notice: Undefined index: name in system_sort_modules_by_info_name() (line 944 of E:\wamp\www\cms\drupal\drupal-7.14\modules\system\system.admin.inc).
Notice: Undefined index: name in system_themes_page() (line 148 of E:\wamp\www\cms\drupal\drupal-7.14\modules\system\system.admin.inc).
Notice: Undefined index: name in system_themes_page() (line 166 of E:\wamp\www\cms\drupal\drupal-7.14\modules\system\system.admin.inc).
Notice: Undefined index: name in system_themes_page() (line 167 of E:\wamp\www\cms\drupal\drupal-7.14\modules\system\system.admin.inc).
Notice: Undefined index: name in theme_system_themes_page() (line 2728 of E:\wamp\www\cms\drupal\drupal-7.14\modules\system\system.admin.inc).

dcrocks’s picture

@AMIT You wouldn't happen to have a theme in your installation whose .info file doesn't contain a NAME specification? Look at #619542: Malformed theme .info files break menu_router generation.

mgifford’s picture

Related issue - #1015368: Notice: Undefined index: name in system_sort_modules_by_info_name()

Patch didn't work for me, but I found what I think is the issue by searching my modules for ;$Id$:

grep -r '$Id' sites/all/modules/contrib/

littleindian’s picture

I got the same error when i was working with my coustom module.
I just edited my .info file .
In .info file i wrote in first
"cd name = module name"
then i changed it to "name = module name" and it worked that error gone.
I hope this will be helpful for you.

raynimmo’s picture

Came across this post when encountered with a similar error whilst building a new module. I had about 20 lines of;

Undefined index: name in system_sort_modules_by_info_name()

I also found that my new custom module and one other, didnt have their name displayed in the modules page although the entry was there with the enable checkbox. Even if i enabled the modules they did nothing.

This was a fresh development install of D7, all it had enabled was the main core modules and testing/development modules with the standard Bartik theme..

Tried a few of the solutions above and then noticed the post by r2Integrated above at #9 where he mentions the file encoding.

Earlier on today was playing around with a few different text editors, it appears that all of the files in my new module where now encoded as UTF-8, changed them all back to ISO 8859-1 and the errors went away.

This wasn't only affected by the modules .info file as that was the first file I changed back, only when I changed the rest of the files back to 8859-1 did it remedy the situation.

These changes brought back the entry for the new module into the main modules page but there was still one missing. I managed to track it down to the Test folder within /coder/coder_sniffer/ I then deleted that entire folder and the errors went away.

Ran cron, flushed the cache, all seems fine.

Hopefully my solution helps anyone else that comes across this problem.

iva2k’s picture

File /coder/coder_sniffer/Test/bad.info is intentionally malformatted, so the code_sniffer tests can be run with a bad code example.

My 2 cents: system_sort_modules_by_info_name() function should guard from missing indexes and not throw warnings/errors. Elsewhere in system.module that same .info file does not make it onto the list of valid modules.

exvita’s picture

Issue tags: +utf8, +Needs backport to D7

I have a similar problem.
I updated from 7.16 to 7.18 today, and then I had below warnings.
And I had tried to change the format to ANSI as advise, but it seemed not working.
I'm quite new to dropal, so kind of stuck and don't know what to do now...

Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of /home/hotellin/public_html/modules/system/system.admin.inc).
Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of /home/hotellin/public_html/modules/system/system.admin.inc).
Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of /home/hotellin/public_html/modules/system/system.admin.inc).
Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of /home/hotellin/public_html/modules/system/system.admin.inc).
Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of /home/hotellin/public_html/modules/system/system.admin.inc).
Warning: uasort() [function.uasort]: Array was modified by the user comparison function in system_modules() (line 800 of /home/hotellin/public_html/modules/system/system.admin.inc).
Notice: Undefined index: name in _system_modules_build_row() (line 982 of /home/hotellin/public_html/modules/system/system.admin.inc).


[update on 2013 June 20]
I am a newbie in Drupal, I'm update my previous find so it might help some others.
I did some update and now to the newest version of 7.22.
I didn't notice but the errors were gong for some while, maybe it's about the core compatibility. Don't know. Some wild guess.

Ash07’s picture

Version: 8.x-dev » 7.18
Issue tags: -utf8

I have the same problem too.
I made a Commerce Kickstart installation, and in administration / site settings / Advanced settings / Modules reports the following errors:

  • Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
  • Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
  • Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
  • Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
  • Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
  • Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
  • Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
  • Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
  • Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
  • Notice: Undefined index: name in system_sort_modules_by_info_name() (line 949 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
  • Warning: uasort() [function.uasort]: Array was modified by the user comparison function in system_modules() (line 800 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
  • Notice: Undefined index: name in _system_modules_build_row() (line 982 of C:\xampp\htdocs\commerce\modules\system\system.admin.inc).
Ash07’s picture

I solved the problem by uninstalling and deleting the Coder module. Now everything is working properly.

droplet’s picture

Version: 7.18 » 8.x-dev

Coder contains a "bad.info". It's designed to be broken..

Ash07’s picture

Thanks droplet

dustinsilva@gmail.com’s picture

Issue tags: -Needs backport to D7

I ran into the error as described by "datenrettung", and attempted to run 'flush all caches' which then caused this error:

Additional uncaught exception thrown while handling exception.

Original

SearchApiException: Unknown or invalid item type node. in search_api_get_datasource_controller() (line 1278 of /var/www/html/sites/all/modules/search_api/search_api.module).

Additional

SearchApiException: Unknown or invalid item type node. in search_api_get_datasource_controller() (line 1278 of /var/www/html/sites/all/modules/search_api/search_api.module).

And after browsing through drush help, I fixed the problem by running these two commands while in the root of the drupal install:
drush cc

cache-clear (cc) Clear a specific cache, or all drupal caches.

drush sapi-c

search-api-clear (sapi-c) Clear one or all search indexes and mark them for re-indexing.

I also had to ensure the field 'item_type' in the 'search_api_index' table in mysql was set to 'node' (I tried setting it equal to the value in the field 'machine_name' with no luck.)

I am not exactly sure of the steps taken to land the error to begin with, but this fixed the secondary error for me.

good luck

droplet’s picture

Assigned: droplet » Unassigned
Issue tags: -utf8, -Needs backport to D7
marcoscano’s picture

I was having the same problem with a custom module, and after converting all my module files from "UTF-8" to "UTF-8 without BOM" the errors disappeared

rwilson0429’s picture

Problem began occurring for me after installing a custom module. Changing the encoding of the .info and the .module file from UTF-8 to ANSI (as stated in #7 and #9) resolved the issue for me.

ruchirashree’s picture

Issue summary: View changes

Hi,

@ #10 Thanks a lot.
It helped me a lot to debug and find out which module was causing issue.
I hope it will help others too.

togbonna’s picture

I also discovered that this could be caused by a .info module file in which the required components (name and description) are left out, even if the module is not enabled.

In this case these notices occurs only in the modules listing page and the module causing the problem will not be listed at all.

In my case the culprit module was rrssb (Ridiculously Responsive Social Share Buttons). In addition to its main module it declared another module rrssb_views which has no code in the .module file and the required components of its .info file were left out.

Filling in the missing components with dummy texts made the problem go away in my case.

jhedstrom’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Patch no longer applies.

jyotisankar’s picture

Status: Needs work » Needs review
FileSize
754 bytes

The changes on the the function "drupal_parse_info_format()" not exist in drupal8. Applied the patch for drupal7

Status: Needs review » Needs work

The last submitted patch, 34: notice-undefined-index-939498-34.patch, failed testing.

jyotisankar’s picture

Version: 8.0.x-dev » 7.x-dev
Status: Needs work » Needs review
FileSize
754 bytes
mgifford’s picture

Applies just fine on Drupal 7.34

What should be done to RTBC this patch? I'm not great with regular expressions but it seems to work fine.

I'm pretty sure this is right \xEF\xBB\xBF according to:
http://stackoverflow.com/questions/204765/elegant-way-to-search-for-utf-...

PlayfulWolf’s picture

Works with 7.36, but patch has to be applied manually, lines do differ. The cause was 1 custom module with 1 file encoded in UTF-8, converting it to ANSI warnings are gone even without patch

shahidaali’s picture

The easiest way to find which module is producing error, just add if(!isset($module->info['name'])) dpm($module->info); in

system.admin.inc

at the end of function function system_modules($form, $form_state = array()) {.

This will tell you which module is producing error.

izmeez’s picture

Patch in comment #36 applies to drupal 7.78 without difficulty but does it really fix a problem or cover up some underlying issue such as an error in a module .info file or file encoding? It does not look like anything was committed to Drupal 8.