This issue is closed as a duplicate of #1170362: Install profile is disabled for lots of different reasons and core doesn't allow for that. See #46 for the reasons why.

On admin/config i see:

Notice: Undefined index: name in system_requirements() (line 40 of /var/www/core/modules/system/system.install).

This is a follow up of http://drupal.org/node/420358

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aspilicious’s picture

Cannot reproduce... ?

dawehner’s picture

Status: Needs review » Postponed

I think my drupal7 is broken

andypost’s picture

Seems this is not issue anymore

aspilicious’s picture

Status: Postponed » Fixed

:)

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Status: Closed (fixed) » Needs review

I just got this error after upgrading a site from 6 to 7 (beta 1). I applied the patch above and it got rid of the message.

My 6 install was an acquia distro so perhaps it has something to do with that?

David_Rothstein’s picture

Status: Needs review » Needs work

Yup, if you installed Drupal 6 with a non-core install profile, then your site will see that error unless the install profile itself has been updated (install profiles in Drupal 7 are supposed to have .info files).

So I think there is probably nothing to do here, but on the other hand, it is a little weird that trying to upgrade your Drupal 6 site requires the install profile to be ready for Drupal also. You are no longer installing anything anymore.

In any case, moving to 'needs work' because the patch doesn't seem like the correct fix. Displaying something other than the install profile's name in that section of the reports page does not make sense to me.

jenyum’s picture

Just got this error upgrading one of my Acquia dev sites to Drupal 7. In general the upgrade from an Acquia distribution was a bit confusing, didn't think to realize until about halfway through that the modules all lived in /modules instead of /sites/all/modules, and also ended up logged out and offline for maintenance turned back to online.

Seems like the upgrade process for custom profiles is not quite ready for prime time. Glad I took this test drive.

okokokok’s picture

I just had the same notice upgrading a site. This patch resolved it.

@7, maybe something like this?

'%profile_name' => array_key_exists('name', $info) ? $info['name'] : $info['distribution_name'],
David_Rothstein’s picture

Title: undefined index: name in system_requirements() » "undefined index: name" and nonsensical install profile information printed in system_requirements()
Status: Needs work » Needs review
FileSize
1.87 KB

I don't see why it makes sense to use the distribution name. That doesn't necessarily have much to do with the install profile.

Maybe the thing to do is just not display it. We already don't display it in the case of the standard install profile anyway, so if we don't have relevant information to print for a different profile, perhaps it makes sense to do the same.

Also, a closely-related bug I noticed is that if the profile version number is not defined, you get a nonsensical string printed to the screen for the install profile also. And that is something you can definitely encounter legitimately (for example, if you are running a profile that you checked out via CVS).

So, this patch tries to fix both of those at once.

SandStorm’s picture

I just installed the Acquia Drupal Stack i downloaded yesterday and did the following:

1. completed the install
2. logged into the newly installed default site
3. disabled all modules that are not part of core
4. deleted all files and folders except those in sites
5. copied across the entire d7-dev build of yesterday
6. ran update.php
7. same error message ...

I did not use any of the advice above yet, assuming that acquia and drupal should have resolved this by now, since the builds/downloads were done in the 48-24 hour window before d7 is released.
---------------
ignore the above, registered a new bug: http://drupal.org/node/1015556

carole’s picture

I can't tell if this patch fixes the nonsensical install profile info or the error, "Notice: Undefined index: name in system_requirements() (line 40 of /Applications/MAMP/htdocs/crypeace2/modules/system/system.install)." I have the latter on a fresh install of D7 (production), displaysuite profile. Do I need this patch?

If not, is there a fix for my present error?

mariagwyn’s picture

@12: Carole, I just used the patch and it removed the exact message you mention.

ckrina’s picture

Title: "undefined index: name" and nonsensical install profile information printed in system_requirements() » Fixed for me

#10 patch worked for me in Drupal 7.2 actualization from Drupal 7.0. The following errors disappeared for me:

"Notice: Undefined index: name a system_requirements() (línia 39 de /Applications/XAMPP/xamppfiles/htdocs/modules/system/system.install)."
"Notice: Undefined index: version a system_requirements() (línia 41 de /Applications/XAMPP/xamppfiles/htdocs/modules/system/system.install)."

Thank you.

clemens.tolboom’s picture

Title: Fixed for me » undefined index: name" and nonsensical install profile information printed in system_requirements()

@ckrina: please don't change the title into garble

ckrina’s picture

Sorry, I did not realize!

oerjann’s picture

#10 patch did not work for me in drupal 7.2:
patch -p0 < system-requirements-undefined-index-679730-10.patch
patching file modules/system/system.install
Hunk #1 FAILED at 29.
1 out of 1 hunk FAILED -- saving rejects to file modules/system/system.install.rej

sethiele’s picture

same here.

aspilicious’s picture

Assigned: Unassigned » aspilicious

Lets reroll

aspilicious’s picture

Assigned: aspilicious » Unassigned
FileSize
1.62 KB

Done

sethiele’s picture

Gread Job!
It seems it works. Thx

enchenu’s picture

oerjann’s picture

yes it works now. tnx aspilicious

ObiWasabi’s picture

Hi,

After installing the recent 7.7 update this morning, the patch seems to have failed:

Notice: Undefined index: distribution_name in system_requirements() (line 39 of /Users/ck/Sites/acquia-drupal/modules/system/system.install).
Notice: Undefined index: version in system_requirements() (line 41 of /Users/ck/Sites/acquia-drupal/modules/system/system.install).

Still alerts after installing patch and clearing caches.

audster’s picture

subscribing

upgrading to 7.6 acquia drupal from 7.4 exact same error as above

have not applied patch since ObiWasabi reports no effect...

oerjann’s picture

yes, the problem reappeared after upgrading to 7.7

ravik777’s picture

same there!
does it affected on site?

David_Rothstein’s picture

Status: Needs review » Needs work

If you're seeing these notices right after an upgrade (and especially if one of them is "Undefined index: distribution_name"), then it's not due to the original bug here but rather a separate problem where your install profile has become disabled. See:
#1170362: Install profile is disabled for lots of different reasons and core doesn't allow for that
#1186196: Fix upgrade documentation to ensure people don't remove profiles from /profiles

However, I think the latest patch here needs work for a different reason:

-   $info = system_get_info('module', $profile);
+  $info = install_profile_info($profile);

I don't think we want to make that change; as far as I know system_get_info() should work here, and core now avoids using install_profile_info() since it's a performance hit on admin pages.

Bright Web Design’s picture

Version: 7.x-dev » 7.7
Priority: Normal » Critical
Status: Needs work » Active

Same error here too...

Notice: Undefined index: name in system_requirements() (line 420 of /home/htdocs/drupal7/modules/system/system.install).

Somebody please help me to solve this issue.

Regards,
Ciril Tomy Thrayil

catch’s picture

Version: 7.7 » 8.x-dev
Component: install system » system.module
Priority: Critical » Major
Issue tags: +Needs backport to D7

A notice isn't critical, however since there are three bug reports with the same notice and apparently different causes, splitting the difference at major, clearly lots of people are running into this and for different reasons.

I was not aware of this issue, only #1170362: Install profile is disabled for lots of different reasons and core doesn't allow for that and #1186196: Fix upgrade documentation to ensure people don't remove profiles from /profiles.

@David and aspilicious, are you suggesting 'distribution name' isn't a required info property for install profiles then?

Also do we even allow install profiles to be installed that don't have version set? While the only profiles with .info files are Drupal 7 ones at the moment, that won't necessarily be the case later.

David_Rothstein’s picture

You can definitely install a profile that has no version set (just like you can install a module without one - e.g., if you got it from Git). I think you might be thinking of the 'core' property instead...

Probably the only way you can have a functioning profile without the 'name' property (which this patch also protects against) is if you upgraded your site from Drupal 6 and the profile wasn't updated too. Based on that, this might be related to those other issues linked to above after all.

'distribution_name' is different - that's not required for install profiles but if it's not there it's supposed to be set by system.module before the info file data is saved to the {system} table. So if that's not there, it almost certainly does indicate one of the other problems from the other issues.

catch’s picture

I think you might be thinking of the 'core' property instead...

I was thinking of that, yes. So we should check for version, but otherwise leave this alone?

To be honest I'm thinking the entire functionality of printing this in system_requirements() should just be removed, because it's got nothing to do with system requirements, but we should probably fix the bug first.

Bright Web Design’s picture

Version: 8.x-dev » 7.7
FileSize
212.75 KB
178.08 KB

This error is happening on the stable 7.7 version! that is why I set the status of this issue as critical.
Please see the attached screen shot for the errors I am getting.

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

I also get a strange error when I run update.php and when I check for updates for the modules too. please see the attached screenshot for reference.

Any help or some idea to fix this issue would be greatly appreciated.

Regards,
Ciril

catch’s picture

Version: 7.7 » 8.x-dev

@Ciril, I changed this to 8.x for a reason, please read http://drupal.org/node/767608

David_Rothstein’s picture

Status: Active » Needs work

Fixing status. (The latest patch is in #20, but needs work as per comments since then.)

Bright Web Design’s picture

Status: Needs work » Active

OK, thanks for pointing out that information!
But could you please tell me how will we get fixed with such bugs? Wait for the Drupal 8 to launch???
It is so sad to see that Drupal 7 launches with lot's of bugs!!!

I am running few live sites with Drupal7 and I am so afraid to upgrade to small upgrades like 7.6 to 7.7 etc, because the site entirely crashes!
So learned a lot from such incidents and keep back of every single files and first I test on local server and test server and finally apply to live server!

Wish at least the Drupal8 launches without much bugs!

Regards,
Ciril Tomy Tharayil
Tokyo, Japan

catch’s picture

@Ciril, currently as soon as a patch gets committed to Drupal 8 (which can happen at any time) it is immediately committed to Drupal 7 as well, with very, very few exceptions, there are currently hardly any changes between the two branches, so most patches apply to both.

To improve Drupal 7 stability as well as to prevent Drupal 8 releasing with as many known bugs, we have (quite recently) instituted http://drupal.org/node/1201874. This is not the issue to discuss this stuff though but I hope that helps to answer the question.

David_Rothstein’s picture

Status: Active » Needs work

Fixing status again (looks like there was an accidental cross-post).

mattbanks’s picture

subscribing

Getting this error when trying to upgrade from an Acquia D6 site to core D7.7.

develway’s picture

Status: Needs work » Needs review
David_Rothstein’s picture

Status: Needs review » Needs work
Bright Web Design’s picture

Status: Needs work » Needs review
xjm’s picture

Tagging.

xjm’s picture

Status: Needs review » Needs work

There is not a working patch in this issue presently.

catch’s picture

Just a note I've duplicated some of the approach here in #1170362: Install profile is disabled for lots of different reasons and core doesn't allow for that - a bit unavoidably if we go for the approach there. I'd like some more people to review that approach before trying to merge the issues together or anything though.

catch’s picture

Status: Needs work » Closed (duplicate)

While the issues have different history, the fix here is exactly the same as the one in #1170362: Install profile is disabled for lots of different reasons and core doesn't allow for that give or take, so I'm going to be bold and mark this as duplicate.

Bosire’s picture

Hello folks,
I solved the problem easily.Tested it on drupal 7.10 (the latest edition) and it works! Check this url: http://www.drupaldeveloper.es/en/Notice-Undefined-index-name-in-system-r...

jmav’s picture

  1. Change variable "install_profile" to "standard".
  2. Clear cache
  3. Enabled the standard profile by drush -> http://localhost pm-enable standard
  4. Perform update

Fixed for the future.

hkovacs’s picture

@david and @aspi,

your patches contain an extra comma after 9 just before the close paren:
+ 'weight' => -9,
+ );

i ran davids patch without the comma and it fixed the problem on my site.

thanks for the patch.

sorry i dont have time to re-roll this patch.

hth

David_Rothstein’s picture

@howiek03, thanks for the review... but this issue is marked as a duplicate of #1170362: Install profile is disabled for lots of different reasons and core doesn't allow for that, which means that any further work on the patch is going on in that issue rather than here.

Also, the trailing comma is actually there on purpose (see http://drupal.org/coding-standards#array).

stockliasteroid’s picture

I'd just like to toss my experience in here for future Googlers...

I ran into this error after using drush update to update Drupal core... Since the profile was resident in the ~/profiles directory, Drush dumped it when it updated core. After that I started seeing the error... I didn't notice that it had lost the profile right away, so I dug around for a while thinking this was a compatibility issue. To fix it, I:

Restored the install profile to ~/profiles
Ran "drush en profile_name" to re-enable the profile.

That took care of it...

bubu’s picture

Status: Closed (duplicate) » Needs review
Tor Arne Thune’s picture

Status: Needs review » Closed (duplicate)
clemens.tolboom’s picture

Issue summary: View changes

Updated issue summary.

Neubian’s picture

@stockliasteroid is onto the problem. I too noticed that this D6 install had a single "default" profile that had been hacked up to pieces. I wasn't able to enable anything because it was so neutered. I went with the solution at:
http://www.drupaldeveloper.es/en/Notice-Undefined-index-distribution-nam...

but I wanted to voice that you're on the right track

I may revisit this after I finish this project.

flefle’s picture

In my case for D7.12 the following fixed the issue:

    if ($profile != 'standard') {
      $info = system_get_info('module', $profile);
	if(!empty($info)){ 
      $requirements['install_profile'] = array(
        'title' => $t('Install profile'),
        'value' => $t('%profile_name (%profile-%version)', array(
          '%profile_name' => array_key_exists('name', $info) ? $info['name'] : $info['distribution_name'],
	  // '%profile_name' => $info['name'], // FLE index error
          '%profile' => $profile,	
         '%version' => $info['version']  // FLE index error
        )),
        'severity' => REQUIREMENT_INFO,
        'weight' => -9
      );
	}
yngens’s picture

Having the same issue here. frizi, where exactly should we run your code in #55?

xjm’s picture

Please follow up in #1170362: Install profile is disabled for lots of different reasons and core doesn't allow for that. This issue has been closed as a duplicate. Thanks!

zerozero333’s picture

Status: Closed (duplicate) » Needs review
David_Rothstein’s picture

Status: Needs review » Closed (duplicate)
mikemadison’s picture

I ran into this issue upgrading to Drupal 7.17. After reading through this and the attached suggested solution (http://drupal.org/node/1170362) I realized that my custom installation profile got replaced during the upgrade. Even after replacing it in the file structure, I could not get Drupal to wipe the errors.

I dropped my development database, replaced my installation profile in the file system, and redid the upgrades. Everything applied cleanly the second time around. This may be a non issue for some of you if you are able to do the same thing that I did and just re-upgrade with the installation profile in place.

wellsys_world’s picture

@lalweil I had the same issue after upgrading to 7.18. The Drush upgrade had removed my installation profile.

I uploaded it again and went into the system table, set the status to 1 for the module and then cleared the cache. This fixed it and got rid of the errors.

jonathanmv’s picture

Status: Closed (duplicate) » Needs review
Tor Arne Thune’s picture

Status: Needs review » Closed (duplicate)
skessler’s picture

This is still an issue in Drupal 7?

isramv’s picture

isramv’s picture

Issue summary: View changes

Updated issue summary.

rajmataj’s picture

I ran into this after updating a Drupal 7.23 to 7.24 which used the profile: demo_profile

After using Drush to update the core to 7.24, saw this error. I verified that demo_profile was still in the /profiles directory of core and ran the following using Drush:

drush en demo_profile -y

...which seemed to clear up the error message at least. No problems so far.

gchalker@princeton.edu’s picture

Version: 8.0.x-dev » 7.x-dev
Issue summary: View changes

Thanks @rajmataj that simply drush command solved my bug for this issue.

g.g

websiteworkspace’s picture

So, here it is years later and I just got this same error after updating a site from 7.59 to 7.60.


Notice: Undefined index: name in system_requirements() (line 34 of /{site}modules/system/system.install).
Notice: Undefined index: version in system_requirements() (line 36 of /{site}modules/system/system.install).

This just seems like poorly written code.
One of the definitions of robust code, is code that is written to respond to and correct problems that it can on its own.
The relevant code in drupal core doesn't do anything of these things, and just fails instead.

rczurek’s picture

So what's the easy repair in the system.install file or do we have to wait for the next version of Drupal?