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.
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
Comment | File | Size | Author |
---|---|---|---|
#33 | error.png | 178.08 KB | Bright Web Design |
#33 | strangr error.png | 212.75 KB | Bright Web Design |
#20 | system-requirements-undefined-index-679730-20.patch | 1.62 KB | aspilicious |
#10 | system-requirements-undefined-index-679730-10.patch | 1.87 KB | David_Rothstein |
system_requirements-undefined_index-fix.patch | 578 bytes | dawehner | |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedCannot reproduce... ?
Comment #2
dawehnerI think my drupal7 is broken
Comment #3
andypostSeems this is not issue anymore
Comment #4
aspilicious CreditAttribution: aspilicious commented:)
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedI 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?
Comment #7
David_Rothstein CreditAttribution: David_Rothstein commentedYup, 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.
Comment #8
jenyum CreditAttribution: jenyum commentedJust 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.
Comment #9
okokokok CreditAttribution: okokokok commentedI just had the same notice upgrading a site. This patch resolved it.
@7, maybe something like this?
Comment #10
David_Rothstein CreditAttribution: David_Rothstein commentedI 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.
Comment #11
SandStorm CreditAttribution: SandStorm commentedI 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
Comment #12
carole CreditAttribution: carole commentedI 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?
Comment #13
mariagwyn CreditAttribution: mariagwyn commented@12: Carole, I just used the patch and it removed the exact message you mention.
Comment #14
ckrina#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.
Comment #15
clemens.tolboom@ckrina: please don't change the title into garble
Comment #16
ckrinaSorry, I did not realize!
Comment #17
oerjann CreditAttribution: oerjann commented#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
Comment #18
sethiele CreditAttribution: sethiele commentedsame here.
Comment #19
aspilicious CreditAttribution: aspilicious commentedLets reroll
Comment #20
aspilicious CreditAttribution: aspilicious commentedDone
Comment #21
sethiele CreditAttribution: sethiele commentedGread Job!
It seems it works. Thx
Comment #22
enchenu CreditAttribution: enchenu commented#10: system-requirements-undefined-index-679730-10.patch queued for re-testing.
Comment #23
oerjann CreditAttribution: oerjann commentedyes it works now. tnx aspilicious
Comment #24
ObiWasabi CreditAttribution: ObiWasabi commentedHi,
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.
Comment #25
audster CreditAttribution: audster commentedsubscribing
upgrading to 7.6 acquia drupal from 7.4 exact same error as above
have not applied patch since ObiWasabi reports no effect...
Comment #26
oerjann CreditAttribution: oerjann commentedyes, the problem reappeared after upgrading to 7.7
Comment #27
ravik777 CreditAttribution: ravik777 commentedsame there!
does it affected on site?
Comment #28
David_Rothstein CreditAttribution: David_Rothstein commentedIf 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:
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.
Comment #29
Bright Web Design CreditAttribution: Bright Web Design commentedSame error here too...
Somebody please help me to solve this issue.
Regards,
Ciril Tomy Thrayil
Comment #30
catchA 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.
Comment #31
David_Rothstein CreditAttribution: David_Rothstein commentedYou 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.
Comment #32
catchI 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.
Comment #33
Bright Web Design CreditAttribution: Bright Web Design commentedThis 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.
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
Comment #34
catch@Ciril, I changed this to 8.x for a reason, please read http://drupal.org/node/767608
Comment #35
David_Rothstein CreditAttribution: David_Rothstein commentedFixing status. (The latest patch is in #20, but needs work as per comments since then.)
Comment #36
Bright Web Design CreditAttribution: Bright Web Design commentedOK, 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
Comment #37
catch@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.
Comment #38
David_Rothstein CreditAttribution: David_Rothstein commentedFixing status again (looks like there was an accidental cross-post).
Comment #39
mattbanks CreditAttribution: mattbanks commentedsubscribing
Getting this error when trying to upgrade from an Acquia D6 site to core D7.7.
Comment #40
develway CreditAttribution: develway commented#20: system-requirements-undefined-index-679730-20.patch queued for re-testing.
Comment #41
David_Rothstein CreditAttribution: David_Rothstein commentedComment #42
Bright Web Design CreditAttribution: Bright Web Design commentedsystem_requirements-undefined_index-fix.patch queued for re-testing.
Comment #43
xjmTagging.
Comment #44
xjmThere is not a working patch in this issue presently.
Comment #45
catchJust 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.
Comment #46
catchWhile 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.
Comment #47
Bosire CreditAttribution: Bosire commentedHello 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...
Comment #48
jmav CreditAttribution: jmav commentedFixed for the future.
Comment #49
hkovacs CreditAttribution: hkovacs commented@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
Comment #50
David_Rothstein CreditAttribution: David_Rothstein commented@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).
Comment #51
stockliasteroid CreditAttribution: stockliasteroid commentedI'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...
Comment #52
bubusystem_requirements-undefined_index-fix.patch queued for re-testing.
Comment #53
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedComment #53.0
clemens.tolboomUpdated issue summary.
Comment #54
Neubian CreditAttribution: Neubian commented@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.
Comment #55
flefle CreditAttribution: flefle commentedIn my case for D7.12 the following fixed the issue:
Comment #56
yngens CreditAttribution: yngens commentedHaving the same issue here. frizi, where exactly should we run your code in #55?
Comment #57
xjmPlease 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!
Comment #58
zerozero333 CreditAttribution: zerozero333 commented#10: system-requirements-undefined-index-679730-10.patch queued for re-testing.
Comment #59
David_Rothstein CreditAttribution: David_Rothstein commentedComment #60
mikemadison CreditAttribution: mikemadison commentedI 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.
Comment #61
wellsys_world CreditAttribution: wellsys_world commented@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.
Comment #62
jonathanmv CreditAttribution: jonathanmv commented#10: system-requirements-undefined-index-679730-10.patch queued for re-testing.
Comment #63
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedComment #64
skesslerThis is still an issue in Drupal 7?
Comment #65
isramv CreditAttribution: isramv commentedComment #65.0
isramv CreditAttribution: isramv commentedUpdated issue summary.
Comment #66
rajmataj CreditAttribution: rajmataj commentedI 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.
Comment #67
gchalker@princeton.edu CreditAttribution: gchalker@princeton.edu commentedThanks @rajmataj that simply drush command solved my bug for this issue.
g.g
Comment #68
websiteworkspace CreditAttribution: websiteworkspace commentedSo, here it is years later and I just got this same error after updating a site from 7.59 to 7.60.
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.
Comment #69
rczurek CreditAttribution: rczurek commentedSo what's the easy repair in the system.install file or do we have to wait for the next version of Drupal?