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.
After installing TouchPro starter kit, I get this error:
Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202 of /home/herbavita/touchpro/includes/install.inc).
Any idea?
Comments
Comment #1
MacMladen CreditAttribution: MacMladen commentedAfter cleaning the cache, this pops:
Comment #2
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedThis is due to a drupal core bug, will work on a fix
Comment #3
Bitbull CreditAttribution: Bitbull commentedJurriaanRoelofs, feedback appreciated. But could you be a little more specific about the core bug? And is there any workaround yet?
Comment #4
jbarrington CreditAttribution: jbarrington commentedThis seems to be more of a problem with Drupal Core and seems to affect all Starterkit Profile installations when the core is upgraded to a more recent version. One suggested solution I came across when researching this problem requires a simple change to a file in core. Unfortunately, changing the core means when the next upgrade takes place, this file is also updated and the problem returns:
After upgrading drupal a profile can display the following error:
Undefined index: name in system_requirements () (line 39 and 41)
To address these Notices, open a file in root directory modules/system/system.install and look at the lines 39 and 41 then replace the code:
Current Code:
/ / Display the Currently Active install profile, if the site
/ / Is not running the install default profile.
$ Profile = drupal_get_profile ();
if ( $ profile ! = 'standard' ) {
$ Info = system_get_info ( 'module' , $ profile );
$ Requirements [ 'install_profile' ] = array (
'Title' => $ t ( 'Install profile' ),
'Value' => $ t ( '% profile_name (% profile-% version)' , array (
'% Profile_name' => $ info [ 'name' ],
'% Profile' => $ profile ,
'% Version' => $ info [ 'version' ]
)),
'Severity' => REQUIREMENT_INFO,
'Weight' => -9
);
}
}
Change to:
/ / Display the Currently Active install profile, if the site is not running
/ / The default install profile and the profile is enabled.
$ Profile = drupal_get_profile ();
if ( $ profile ! = 'standard' ) {
$ Modules = module_list ();
if (isset ( $ modules [ $ profile ])) {
$ Info = system_get_info ( 'module' , $ profile );
$ Requirements [ 'install_profile' ] = array (
'Title' => $ t ( 'Install profile' ),
'Value' => $ t ( '% profile_name (% profile)' , array (
'% Profile_name' => $ info [ 'name' ],
'% Profile' => $ profile ,
)),
'Severity' => REQUIREMENT_INFO,
'Weight' => -9
);
}
}
}
Please remember, making changes to core is NOT recommended and if it is possible to use over-rides this is the preferred option
Hope this helps. JB
Comment #5
jbarrington CreditAttribution: jbarrington commentedAlso found this solution which worked for me following an upgrade to Drupal 7.14:
This error also appears after each new update of Drupal 7.
Solution:
Go to includes/install.inc and change line 202:
// Remove or comment out this line
return $info['distribution_name'];
// Add the following lines instead
if ( ! array_key_exists('distribution_name', $info)) $info['distribution_name'] = 'Drupal';
return $info['distribution_name'];
Save the file and Upload it, replacing the existing includes/install.inc