Since upgrading last night, I am getting the following error on the modules list page:

Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202 of /home/cpelham/public_html/dev.crsny.org/public/includes/install.inc).

Comments

ckrina’s picture

I have exactly the same error when I updated to D7.2 from D7.0:
"Notice: Undefined index: distribution_name a drupal_install_profile_distribution_name() (línia 202 de /Applications/XAMPP/xamppfiles/htdocs/includes/install.inc) "

In my case, I am working with XAMPP (version 1.7.3, with php version 5.3.1) in MacOs.

Does anybody know any way to fix it? I've expended hours serching to solve it and all I founded is this post: http://drupal.org/node/785380, where says that to fix some other problems (and I think they expect this one too) is to use an older version of php (5.2). But my previous Drupal version (7.0) was running perfectly with this XAMPP (php 5.3)...

taspalazzo’s picture

I got exactly the same problem with yours, have you found how to recover it?

ckrina’s picture

Sorry, was too much time ago to remember it in detail, but was something related with drupal profiles and solved it via SQL.

Nora McDougall’s picture

I think that this has been a problem since 2008.

pxljedi’s picture

After upgrading to 7.20, I too was receiving the error. I followed the directions here:

http://www.drupaldeveloper.es/en/Undefined-index-distribution-name-in-dr...

In case the directions disappear from the other site:

This error also appears after each new update of Drupal 7.
Solution:
Go to includes/install.inc and change line 202:
Two (--) means that this must change with others that are two (++)

-- return $info['distribution_name'];
++ if ( ! array_key_exists('distribution_name', $info)) $info['distribution_name'] = 'Drupal';
++ return $info['distribution_name'];
sydneyshan’s picture

Nice - this fixed it for me.

4toddt’s picture

This worked for me after I figured out what it meant. Insert: if ( ! array_key_exists('distribution_name', $info)) $info['distribution_name'] = 'Drupal'; before the existing line that says: return $info['distribution_name'];

jonathanmv’s picture

For me (Commerce Kickstart 7.x-2.6, drupal 7.22) the fix needed to be pasted after 206 line. The whole function looks like this now

function drupal_install_profile_distribution_name() {
  // During installation, the profile information is stored in the global
  // installation state (it might not be saved anywhere yet).
  if (drupal_installation_attempted()) {
    global $install_state;
    return $install_state['profile_info']['distribution_name'];
  }
  // At all other times, we load the profile via standard methods.
  else {
    $profile = drupal_get_profile();
    $info = system_get_info('module', $profile);
    if ( ! array_key_exists('distribution_name', $info)) $info['distribution_name'] = 'Drupal';
        return $info['distribution_name'];
    return $info['distribution_name'];
  }
}
jacobstella’s picture

Pasted the code exactly like you said and it worked perfectly. Thank you.

gchalker@princeton.edu’s picture

Thanks Clearification,

Your clarification help me solve this issue.
Thanks for being so clear!

gg

gianfrasoft’s picture

This is the solution for me, too.

Thank you!

Web Software Engineer at
Insem S.p.A. - www.insem.it

hondaman900’s picture

Thank you. After much searching on this error, finally a good solution.

cabplan’s picture

This worked for me but I also had to add it to line 209 besides line 201

sahil_babu’s picture

Thanks @pxljedi this works for me

brnhrt’s picture

This one did the trick for me. Thanks.

lindamoran57’s picture

I just upgraded my site to 7.2, and got this message on the modules page: Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202 of /home/xxxxxxx/public_html/includes/install.inc).

As a point of interest, as of last night I also have Drupal running on my hard drive using XAMPP for Windows. This was my first installation of Drupal on my hard drive; therefore it is 7.2 but not an upgrade. I do NOT get the error message there.

rickmanelius’s picture

I'm using Drupal Commerce kickstart profile and upgraded from 7.0 to 7.2. Same issue.

Security breaches hurt, particularly when it involves customer credit card data. Learn how you can mitigate these risks by reading the community supported Drupal PCI compliance white paper.

Nora McDougall’s picture

I think that this problem mostly shows up when you install from something other than the standard. We encountered the same problem when upgrading a Kickstart install to 7.19. I'm not sure where the 7.2 comes in.

wedou’s picture

I'm running Acquia locally. Was working fine, now I get this after upgrade:

Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202 of C:\Users\william\Desktop\acquia-drupal\includes\install.inc).

Nora McDougall’s picture

I have read multiple pages on this problem. For the folks who give more information than just that they have the same problem, it seems that only non-standard installs have this issue. But, that fact is not clearly stated - or refuted.

gtsopour’s picture

After upgrading to 7.2, i am getting the following notice
Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202 of ...\includes\install.inc)

Zachmo’s picture

Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202 of /var/www/vhosts/dixonschwabl.net/subdomains/thenewnew/httpdocs/includes/install.inc).

Did I break the internet?

paddy_deburca’s picture

I had the same problem - I am testing the upgrade of a 6.x site to 7.2. The 6.x site was probable installed using acquila - and thus having profile name of acquila.

I debugged the process and could see in install.inc

<?php
    $profile = drupal_get_profile();
    $info = system_get_info('module', $profile);
    return $info['distribution_name'];
?>

but acquila was not enabled neither as a profile or as a module. So, I played with the variable table and deleted the 'installed_profile' variable - the default is ' standard' -- but standard was not enabled as a profile. Hence drush (http://drupal.org/projects/drush and http://drush.ws). I enabled the standard profile by

drush -l http://localhost pm-enable standard

I was asked to enable some more standard modules and I got a whole host of warnings -- I just ignored them (was that a bad thing?? I don't know)

The following extensions will be enabled: rdf, overlay, toolbar, shortcut, file, image, dashboard, contextual, standard
Do you really want to continue? (y/n): y
WD php: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Filtered HTML' for key      [error]
'name': INSERT INTO {filter_format} (format, name, cache, status, weight) VALUES (:db_insert_placeholder_0,
:db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array
(
    [:db_insert_placeholder_0] => filtered_html
    [:db_insert_placeholder_1] => Filtered HTML
    [:db_insert_placeholder_2] => 1
    [:db_insert_placeholder_3] => 1
    [:db_insert_placeholder_4] => 0
)
 in filter_format_save() (line 210 of /Users/paddy/Sites/modules/filter/filter.module).
WD php: Warning: Cannot modify header information - headers already sent by (output started at                           [warning]
/Users/paddy/Sites/sites/all/modules/drush/includes/drush.inc:579) in drupal_send_headers() (line 1039 of
/Users/paddy/Sites/includes/bootstrap.inc).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &#039;Filtered HTML&#039; for key &#039;name&#039;: INSERT INTO {filter_format} (format, name, cache, status, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array
(
    [:db_insert_placeholder_0] => filtered_html
    [:db_insert_placeholder_1] => Filtered HTML
    [:db_insert_placeholder_2] => 1
    [:db_insert_placeholder_3] => 1
    [:db_insert_placeholder_4] => 0
)
 in filter_format_save() (line 210 of /Users/paddy/Sites/modules/filter/filter.module).

BUT - I no longer have the undefined index error.

I hope that this gives inspiration to someone to find a definitive solution when you upgrade from D6 with one profile to D7 where that profile does not exist.

Paddy.

drupal_simply_amazing’s picture

Thanks sir. It is also works for me.

maniosullivan’s picture

Worked for me after upgrading site from 6 to 7.

Nice work Paddy!

Nora McDougall’s picture

When I do a search for acquila, it keeps diverting to acquia. What is acquila?

dgastudio’s picture

same here.

MyXelf’s picture

To workaround this issue (already reported in Drupal Core) see post #8 in #1170362: Install profile is disabled for lots of different reasons and core doesn't allow for that.

All the profiles values in the system table will be set to 0, change anyone to 1 and the notice should go away.

charlie-s’s picture

This did not change the error for me.

balintd’s picture

This solved the problem for me, thanks.

alltooeasy’s picture

This solved it.
Managed to have the wrong Link (an install profile selected ) and copied and pasted it into Add Modules.
Too many windows open.
Fixed it.
Cheers!

Nora McDougall’s picture

We have upgraded to 7.19 from a Kickstart install. The systems table only seems to have one "profile" value, which is

modules/profile/profile.module profile module 0 0 -1 0 a:13:{s:4:"name";s:7:"Profile";s:11:"description";s:36:"Supports configurable user profiles.";s:7:"package";s:4:"Core";s:7:"version";s:4:"7.19";s:4:"core";s:3:"7.x";s:5:"files";a:1:{i:0;s:12:"profile.test";}s:9:"configure";s:27:"admin/config/people/profile";s:6:"hidden";b:1;s:7:"project";s:6:"drupal";s:9:"datestamp";s:10:"1358374870";s:12:"dependencies";a:0:{}s:3:"php";s:5:"5.2.4";s:9:"bootstrap";i:0;}

So, when you use "profile values" do you mean this record or a different record? The admin/config/people makes me suspicious about whether this is the correct record or not.

Zachmo’s picture

I was having trouble with this as well.
I initially started my site with an acquia install but soon needed to upgrade core.
Acquia had no upgrade so I figured I could just install drupal core over it being sure not to overwrite the additional modules acquia throws in.
The site was running fine but I was getting an "Undefined index: distribution_name in drupal_install_profile_distribution_name()" error on the modules page and some other undefined index errors on the configuration page. (code that throws the error is below)

201    $profile = drupal_get_profile();
202    $info = install_profile_info($profile);
203    return $info['distribution_name'];

I did some digging and found out that the "drupal_get_profile()" function was returning 'acquia' instead of the 'standard' profile. As a result the "install_profile_info()" was returning an associative array that had different indexes than what the standard drupal install wanted.

Long story short I ran the following code and all my problems were solved.

variable_set('install_profile', 'standard');

Hope this helps someone else.

rcharamella’s picture

Where did you "run" the code? Could you post a more detail description of how to do this?
Thanks

Zachmo’s picture

You can put it anywhere as long as that php is getting run. Try putting it in html.tpl.php. Refresh the page once and then delete that line. It just needs to be run once.

All that function is doing is changing a value in the variables table in your drupal database.

JessicaK’s picture

Thank you, this worked for me too

GeorgeLitos’s picture

SOLVED:
enable the text format PHP code from /admin/config/content/formats
preview and you're set, you can disable PHP format if you don't need it.

SOLVED: this SQL statement worked
UPDATE `drupal`.`system` SET `status` = '1' WHERE `system`.`filename` = 'profiles/standard/standard.profile';

johannsmith’s picture

Thanks this solved my error, my status was '0' for the 'profiles/standard/standard.profile' in the System table, changed it to 1 and voila, no more error.

Cheers,
Johann Smith

betarobot’s picture

Thanks, solved my error. Most probably something went wrong with prev. drupal updates.

Might help somebody (SQL query without database name, as it might be different for everybody):
UPDATE `system` SET `status` = '1' WHERE `system`.`filename` = 'profiles/standard/standard.profile';

heyehren’s picture

Thanks, this worked for me.

aromka’s picture

Worked for me as well! Thanks dude!

joel.morris’s picture

Yes, this worked for me, too.

nasia123’s picture

I confirm that changind this value in tha database works.
I think that when updating drupal from acquia distribution, to a drupal palin core distribution, the profiles folder should not be removed.

pipicom’s picture

Worked for me too! You saved the day Zachmo..

filtermusic.net

Nora McDougall’s picture

This seems to be a problem with the Drupal core http://drupal.org/node/1170362 not with a specific install.

jaxaza’s picture

Thank You Admin for Share

pkosenko’s picture

Check out the profile switcher module:

https://www.drupal.org/project/profile_switcher

I had about the same problem that you had, wanting to upgrade an "acquia" profile and change it to "standard" in the process. I got myself into a whole lot of trouble trying to disable and move and install modules from "profiles/acquia/modules" to "sites/all/modules" and going into the database system table to change module paths, then setting the install_profile variable to standard using Drush. I finally ended up getting the missing "distribution_name" error that everyone is getting.

It seems that that information is in the profile's system table "info" column serialized configuration data (see the very last item). I actually outsmarted myself by deleting the acquia profile entry, then trying to figure out how to redo it as a "standard" profile data row in the system table.

Here's the acquia configuration data from the "info" column:

a:13:{s:4:"name";s:13:"Acquia Drupal";s:11:"description";s:24:"Acquia enchanced Drupal.";s:4:"core";s:3:"7.x";s:12:"dependencies";a:25:
{i:0;s:5:"block";i:1;s:5:"color";i:2;s:7:"comment";i:3;s:10:"contextual";i:4;s:9:"dashboard";i:5;s:4:"help";i:6;s:5:"image";i:7;s:4:"list";i:8;s:4:"menu";i:9;s:6:"numb
er";i:10;s:7:"options";i:11;s:4:"path";i:12;s:8:"taxonomy";i:13;s:5:"dblog";i:14;s:6:"search";i:15;s:8:"shortcut";i:16;s:7:"toolbar";i:17;s:7:"overlay";i:18;s:8:"field
_ui";i:19;s:4:"file";i:20;s:3:"rdf";i:21;s:5:"token";i:22;s:8:"pathauto";i:23;s:12:"acquia_agent";i:24;s:10:"acquia_spi";}s:5:"files";a:1:{i:0;s:14:"acquia.profile";}
s:6:"acquia";s:1:"1";s:7:"version";s:8:"7.x-
1.10";s:7:"package";s:5:"Other";s:3:"php";s:5:"5.2.4";s:9:"bootstrap";i:0;s:6:"hidden";b:1;s:8:"required";b:1;s:17:"distribution_name";s:6:"Drupal";}

After messing around in the database, I said to myself, "There has to be an easier way. Someone should write a module for switching profiles." Well . . . they have, but I hadn't found it.

https://www.drupal.org/project/profile_switcher

When I installed "profile switcher" and changed to standard profile . . . the module repopulated the profile data in my database, and I no longer had the missing "distribution_name" error. This is the standard profile configuration data as it showed after running "profile switcher":

a:15:{s:4:"name";s:8:"Standard";s:11:"description";s:51:"Install with commonly used features pre-
configured.";s:7:"version";s:4:"7.43";s:4:"core";s:3:"7.x";s:12:"dependencies";a:21:
{i:0;s:5:"block";i:1;s:5:"color";i:2;s:7:"comment";i:3;s:10:"contextual";i:4;s:9:"dashboard";i:5;s:4:"help";i:6;s:5:"image";i:7;s:4:"list";i:8;s:4:"menu";i:9;s:6:"numb
er";i:10;s:7:"options";i:11;s:4:"path";i:12;s:8:"taxonomy";i:13;s:5:"dblog";i:14;s:6:"search";i:15;s:8:"shortcut";i:16;s:7:"toolbar";i:17;s:7:"overlay";i:18;s:8:"field
_ui";i:19;s:4:"file";i:20;s:3:"rdf";}
s:7:"project";s:6:"drupal";s:9:"datestamp";s:10:"1456343506";s:5:"mtime";i:1461958424;s:7:"package";s:5:"Other";s:3:"php";s:5:"5.2.4";s:5:"files";a:0:{}
s:9:"bootstrap";i:0;s:6:"hidden";b:1;s:8:"required";b:1;s:17:"distribution_name";s:6:"Drupal";}

artfulrobot’s picture

My site I suppose began life as a "standard" install but I've removed toolbar (in favour of 'admin') and rdf (breaks html5 validation in omega).

Now I keep getting this error. I've tried the http://drupal.org/node/1170360#comment-5073326 hack but I'm still getting this error (on the modules page at least).

Is there a way to install a less problem-prone install profile (I'm guessing 'minimal') over the top without destroying my site?

Or do I just hack core?

Rich

mibfire’s picture

same on module page

cyberlinux’s picture

I'm no expert, and do not know if this is the best solution.
Solved my problem by following the hint of this site:

http://www.drupaldeveloper.es/en/Notice-Undefined-index-distribution-nam...

tranquilrealm’s picture

You've saved my day!

Anonymous’s picture

This solution worked for me as well after using the Commerce Kickstart profile installation and updating the core from 7.10 tot 7.12.

bhosmer’s picture

Within the system table you will find a profiles/standard/standard.profile

If you change the status to 1, it should get rid of the error.

greta_drupal’s picture

Saw no such entry for profiles/* in the (D7) Systems table. However, do see that file in the PROFILES module directory. Is that what you meant? If so, where to make that change? I'd really hate to have to hack core.

[Noted: Edited, as my reported resolution was not so.]

TransitionKojo’s picture

I tried this and it worked for me. Error gone. Thanks!

mohhess’s picture

cyberlinux's help was what worked for me. Use the link that he supplied (http://www.drupaldeveloper.es/en/Notice-Undefined-index-distribution-nam...)

Nora McDougall’s picture

Bummer, that link doesn't work. That site solved another upgrade issue I had so it's a good site in general.

fejn’s picture

This looks to be what they are referring to:

This seems the same as one of the previous posts (http://drupal.org/node/1170360#comment-5073326 )

anandax’s picture

After changing status from 0 to 1 in table "system" --> filename "profiles/standard/standard.profile" with phpMyAdmin the error gone away.
See post 8

esod’s picture

I couldn't find profiles/standard/standard.profile in the system table, but I did find profiles/minimal/minimal.profile. Changed it to:

UPDATE DATABASE.system SET status = 1 WHERE system.filename = profiles/minimal/minimal.profile;

And the error message went away.

Nora McDougall’s picture

You are so right. We upgraded to Drupal 7.19 and that file name can't be found in the system table. But then, neither can profiles/minimal/minimal.profile. It would be great to know why.

jimthunderbird’s picture

I got the same error after using drush to install my profile.

Then I figured out that in my sites/default/settings.php, adding this line solve the problem:

$conf['install_profile'] = 'jimthunderbird'; //jimthunderbird is one of my current installation profile name

Or before running drush insall, i need to chmod 644 sites/default/settings.php

Here are all the commands that I used:

chmod 644 sites/default/settings.php; yes | drush site-install jimthunderbird --db-url=mysql://root:@localhost/drupaluniversity --account-name=admin --account-pass=admin;

I think the root cause is, in my sites/default/settings.php, previously it has another installation profile name that's not jimthunderbird (my current one), once I change it to match the current installation profile, this issue is gone.

$conf['install_profile'] = 'jimthunderbird';

jdelgama’s picture

What worked for me:

Execute SQL through phpmyadmin:
UPDATE `system` SET `status` = '1' WHERE `system`.`filename` = 'profiles/standard/standard.profile';

and, in settings.php:
$conf['install_profile'] = 'standard';

queenvictoria’s picture

$ drush --uri=local.example.com variable-set "profiles/standard/standard.profile" 1

lstandish’s picture

Thanks, this also worked for me on a Drupal site I inherited. Activating the standard profile was not enough, I had to add
$conf['install_profile'] = 'standard'; to settings.php as well, as you indicated.

Ajay Gadhavana’s picture

Working for me too, Just fired that query and its working.

Nora McDougall’s picture

It's great that you added this comment, but what does it mean? //jimthunderbird is one of my current installation profile name

For example, I have seen posts from folks who installed acquai and kickstart, are those installation profile names too?

kundanrai’s picture

If you can't see minimal or standard, then you might have this profiles/acquia/acquia.profile Change its status to '1' and it will be gone.

Nora McDougall’s picture

I guess this depends on your original install. Besides acquia, there is Kickstart and who knows how many other install options. 7.19 doesn't seem to refer to any of these in the systems table.

dgale’s picture

I installed Drupal 7.14 using a profile as part of a premium theme I purchased. When I updated to 7.16, I deleted all the existing core folders and files and replaced them with the ones from new version.

What I didn't realize is that in doing so, I deleted the profile folder that was part of my installation. Thankfully I had a backup copy of the expanded install and was able to restore the missing profile.

So don't delete the profiles folder when updating core is the lesson, I guess.

UPDATE:Never mind. That didn't fix it. I'm doing the database fix like everyone else now.

youlikeit’s picture

I didn't had the standard profile.
So I had to upload from my backup l10n_install and than updated my mysql file and set the status for
profiles/l10n_install/l10n_install.profile to 1
This worked for me;

Nora McDougall’s picture

What is 10n?

fejn’s picture

Guessing that since they are talking about multilingual, they are referring to the Internationalization module.
There is a distribution profile coming out fairly soon that is for this also Mulilingual distribution

fejn’s picture

Got the names wrong. in hopes that it will help someone else just learning their way around the jargon:
l10n localization
I18n internationalization

colorado’s picture

Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202)

This fix at http://adaptivethemes.com/documentation/distribution-name-notice worked for me:

(text from that post is copied below)

distribution_name notice

Due to a bug in Drupal core you may encounter this PHP notice:

Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202)

For the most part this will not cause major problems, but can cause an issue during updates - if the update installer encounters an error it can abort the update process. In this case you really need to fix this problem.

The Fix
You need to edit the database - sorry but this is the only way to fix this very annoying issue.

Locate the System table in the database, find the "profiles/demo_profile/demo_profile.profile", and change the status from 0 to 1.

You can also run this SQL query on the database:

UPDATE `my_database_name`.`system` SET `status` = '1',
`info` = '' WHERE `system`.`filename` = 'profiles/demo_profile/demo_profile.profile';
Last updated 31st July, 2012 - 5:23am

Authored by Jeff Burnz on 31 July, 2012 - 05:18

Nora McDougall’s picture

It looks like this is yet another install situation that produces this error. However, it seems that with 7.19 that record may not exist? I would like to hear from you about it.

doomed’s picture

I was getting the reported error message and this fixed it.

In fact, this error was on a Drupal "demo installation" from AdaptiveThemes. It originally came with Drupal 7.19 and I updated it to v7.22 and that's when the error message started coming up in the Modules page.

coozila’s picture

i have set also
drush vset install_profile demo_profile

adamsteele’s picture

Hi Andrey,

Thank you so much for posting this. This solved it for me too.
I'm just posting this step by step for the benefit of others.

1. Access PHPMyAdmin
2. Browse to your the system table of your database for eg: localhost » MyDatabase » myprefix_system
3. Switch to the SQL tab.
4. Clear the Query Editor.
5. Run the query below taking care to replace your table name as below

UPDATE `myprefix_system` SET `status` = '1' WHERE `myprefix_system`.`filename` = 'profiles/standard/standard.profile';

6. If your result is something like

1 row affected. ( Query took 0.0816 sec )

then it's done.
7. Refresh the page and review the results.

Dynomite00001’s picture

Thanks for posting the step by step instructions. This fixed the issue for me.

bpopp’s picture

Thanks for the simple step-by-step instructions! I use MySQL Workbench instead of PHPMyAdmin and had to make a couple of minor changes to get it to work so I thought I would share them. The main difference is that you only need to navigate to the database (rather than the system table in the database) and you don't have add a prefix to "system" in the query.

1. Access MySQL Workbench
2. Browse to your database for eg: localhost » MyDatabase
3. Switch to the QUERY tab.
4. Clear the Query Editor.
5. Run the query below

UPDATE `system` SET `status` = '1' WHERE `system`.`filename` = 'profiles/standard/standard.profile';

6. If your result is something like

1 row affected. ( Query took 0.0816 sec )

then it's done.

7. Refresh the page and review the results.

mntash’s picture

I am getting this error when visiting admin/modules:

Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 207 of /home/example/public_html/includes/install.inc).

In the SYSTEM database table, I have tried setting the status of profiles/standard/standard.profile to 1, but I still get the error and it keeps reverting back to 0.

Any ideas?

cooldeeponline’s picture

thank you solved my case!!! (Y)

magpoc’s picture

Thanks for the info.
But do I need to issue the SQL every time I update a module?
I hope it will be fixed.

CMStom’s picture

My error:
Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 207 of my_drupal_path/includes/install.inc).

Deleted the 'installed_profile' variable from the variables table.

ran drush command "drush -l http://localhost pm-enable standard"

cleared cache.

Thomas Newman
UI Developer
https://cmstom.com

ressa’s picture

Thanks for posting your solutions, I just had the same problem, but running this in phpmyadmin fixed it:

UPDATE `DATABASE_NAME`.`system` SET `status` = '1' WHERE `system`.`filename` = 'profiles/standard/standard.profile';

Change 'DATABASE_NAME' to match yours.

HeathN’s picture

This was the solution for me.

jorisx’s picture

Thanks
Drupal rockz!!

scott.browne’s picture

found one row, and changed it. Problem solved. Couldnt make it any sweeter of a fix.

Sally Gr’s picture

I might be stating the obvious to some, but, make sure the path follows the profile you are using. Use this for the Commerce Kickstart profile:

UPDATE `dbName`.`dbTable` SET `status` = '1' WHERE `system`.`filename` = 'profiles/commerce_kickstart/commerce_kickstart.profile';

It's about row 136 in a kickstart database installation.
So glad I finally have those messages gone.

heyitspython’s picture

For me, the solution was ensuring that I had php5-mysql installed and php5-gd installed. Make sure you have both of these!

knalstaaf’s picture

For those not too handy with SQL execution code, here's the manual approach: https://drupal.org/comment/7017304#comment-7017304

DRIVE’s picture

This worked well for me after I updated a handful of modules on Localhost running Adaptive Theme. Not sure why it cropped up on this particular dev-box as I have been using AT for a long time on that machine with many updates to various modules for 6 or 8 months.
Not sure what module caused that error, I updated 7 of them. Ctools, Views, Date, Entity, Libraries, jQuery Update and after running the updates the error appeard any time I used the admin-overlay.

Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 207...

As mentioned further down the line, if you are using a distribution, you need to adjust the SQL snippet accordingly.

Move the Chains - Ashes of Ares

Nicolás Vásquez’s picture

I have the same problem with adaptative, what did you do to fix it :) ?
Thx in advance

druppy78’s picture

i everybody,

I bring my own experience of this problem (alas, without satisfactory answer)

I first install a Acquia distro (7.16 I guess), then I apply "standard" Drupal update of the core for which I have the famous message

Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 207 of includes/install.inc).

The best ways I found in forum to patch this was to :

Go to includes/install.inc and change line 207:
Two (--) means that this must change with others that are two (++)
-- return $info['distribution_name'];
++ if ( ! array_key_exists('distribution_name', $info)) $info['distribution_name'] = 'Drupal';
++ return $info['distribution_name'];

But I have to do this for every update (and we're now à 7.34) so this is not a solution.

I have investingated in other ways like :

Mysql :

SYSTEM table

delete * from system where filename like 'profiles/acquia$';
UPDATE system SET status = 1 WHERE filename= 'profiles/standard/standard.profile';
or even
UPDATE system SET status = 1 WHERE system.filename = 'profiles/minimal/minimal.profile';
or

VARIABLE table

deleted records from the 'variable' table
as install_profile (was this a mistake ?)
and every variable that contains "acquia"

PHP:
drush -l http://www.naddeo.fr pm-enable standard
or
add in settings.php:
$conf['install_profile'] = 'standard';

But nothing change the message...

Any help ?

Best regards

Morten Andersen’s picture

I have the same problem in Drupal 7.34

detroz’s picture

dkhill’s picture

I have went round and round with this one.
I checked the system table for an "Active" profile.
I have extracted and reviewed the BLOB info column value for the only one install profile.
I have traced the error all the way back to the function that is calling it.

function system_get_info($type, $name = NULL) {
  $info = array();
  if ($type == 'module') {
    $type = 'module_enabled';
  }
  $list = $type);
  foreach ($list as $shortname => $item) {
    if (!empty($item->status)) {
      $info[$shortname] = $item->info;
    }
  }
  if (isset($name)) {
    return isset($info[$name]) ? $info[$name] : array();
  }
  return $info;
}

This function is calling the system_list() function.
I'm going to try installing Standard First, then The Chapter 3 data to see if this will fix the issue.

Jawi’s picture

Any progress on this issue?

After updating to kickstart 2.25 several issues occured.

Notice: Undefined index: version in commerce_kickstart_update_status_alter() line 207 mydomain.com/public_html/profiles/commerce_kickstart/commerce_kickstart.profile).

Did you had any succes on similar issues?

Practice what you preach >> www.jawi-online.nl >> Full service internet bureau >>

gchalker@princeton.edu’s picture

I received this error because I was using a Demo site by Adaptive Themes.
My database needed to be updated to that fact.

Using this code, advised by AdaptiveThemes, fixed my issue.

UPDATE `my_database_name`.`system` SET `status` = '1',
`info` = '' WHERE `system`.`filename` = 'profiles/demo_profile/demo_profile.profile';

Johan den Hollander’s picture

https://www.drupal.org/project/profile_switcher fixed this for me.

Just re-enable the standard profile.

andresc75’s picture

Received this error After upgrading from 6.38 to 7.44 using drush ver 6.2 with drush_sup module 7.x-2.0-beta2.
Installed profile_switcher and change to "standard" worked for me.

Francis47’s picture

This worked wonders for me. None of the above did.
Thanks.

smith121’s picture

Install profiles have all their files stored in the site root’s profiles/ directory. The first step is going to be moving everything out of there. In the case of push tape, we have libraries, modules, and a theme stored in there. We’re going to move them to a more normal location.Next we need to see if there are any variables set in the install profile which really depend on the profile directory. If there are, we’ll have to set them again with the new path.

ajaybhaskar’s picture

Hi,

Thanks for this post i am face same problem like you have mentioned above and resolve my issue using you post and it work for me.

Thanks

edukates’s picture

Just upgraded to 7.53 and got the same error. Your post (inserting if ( ! array_key_exists('distribution_name', $info)) $info['distribution_name'] = 'Drupal'; before the "return $info....." worked perfectly. For one time I do not have to live with an annoying error!

Thanks!

mighty_webber’s picture

It is not recommended to modify Drupal Core code. After some digging, I was able to find some information on how to correct the database entry.

The comments that alluded to the fact most sites having this problem were unconventionally installed, such as a Migration, let me to the following solution. It seems that any custom Profiles that are installed are set to Status = 0 in the Database for some reason.

Run this SQL to find out which profiles are in the database and check their status:

SELECT filename, status FROM system WHERE filename LIKE '%.profile';

Then run this SQL, replacing the filename value with the desired custom Profile's filename value.

UPDATE system SET status = '1' WHERE filename = 'profiles/standard/standard.profile';

Here is the original post I pulled from: https://gist.github.com/jerryorta-dev/4594531.

osu_bucks’s picture

Hi,
I'm also running into this issue because we are using custom profile.
I can run the SQL statement to replace the status from 0 to 1. But it seems whenever we run update, the database resets it back to 0.
Any other idea?
I also tried running drush vset and adding $conf['install_profile'] = 'standard'; to settings.php. But so far, none really work reliably.

thanks,

mighty_webber’s picture

Have you tried any of the drush options? This look like it might be promising.

http://davehall.com.au/blog/dave/2012/09/12/switching-installation-profi...

Also, make sure another profile doesnt have exclusivity set.

https://www.drupal.org/docs/7/creating-distributions/how-to-write-a-drup...

Just to be clear, this profile did previously work, correct?

aaustin’s picture

I ran in to this problem upgrading an Acquia profile. I couldn't just set the variable for install_profile because I didn't have standard.profile in my system table. So I just exported the row from another working install and imported it in to my broken install.

db_query("INSERT INTO `system` (`filename`, `name`, `type`, `owner`, `status`, `bootstrap`, `schema_version`, `weight`, `info`) VALUES
('profiles/standard/standard.profile', 'standard', 'module', '', 1, 0, 0, 1000, 0x613a31353a7b733a343a226e616d65223b733a383a225374616e64617264223b733a31313a226465736372697074696f6e223b733a35313a22496e7374616c6c207769746820636f6d6d6f6e6c792075736564206665617475726573207072652d636f6e666967757265642e223b733a373a2276657273696f6e223b733a343a22372e3537223b733a343a22636f7265223b733a333a22372e78223b733a31323a22646570656e64656e63696573223b613a32313a7b693a303b733a353a22626c6f636b223b693a313b733a353a22636f6c6f72223b693a323b733a373a22636f6d6d656e74223b693a333b733a31303a22636f6e7465787475616c223b693a343b733a393a2264617368626f617264223b693a353b733a343a2268656c70223b693a363b733a353a22696d616765223b693a373b733a343a226c697374223b693a383b733a343a226d656e75223b693a393b733a363a226e756d626572223b693a31303b733a373a226f7074696f6e73223b693a31313b733a343a2270617468223b693a31323b733a383a227461786f6e6f6d79223b693a31333b733a353a2264626c6f67223b693a31343b733a363a22736561726368223b693a31353b733a383a2273686f7274637574223b693a31363b733a373a22746f6f6c626172223b693a31373b733a373a226f7665726c6179223b693a31383b733a383a226669656c645f7569223b693a31393b733a343a2266696c65223b693a32303b733a333a22726466223b7d733a373a2270726f6a656374223b733a363a2264727570616c223b733a393a22646174657374616d70223b733a31303a2231353139323335313532223b733a353a226d74696d65223b693a313531393233353135323b733a373a227061636b616765223b733a353a224f74686572223b733a333a22706870223b733a353a22352e322e34223b733a353a2266696c6573223b613a303a7b7d733a393a22626f6f747374726170223b693a303b733a363a2268696464656e223b623a313b733a383a227265717569726564223b623a313b733a31373a22646973747269627574696f6e5f6e616d65223b733a363a2244727570616c223b7d);");

variable_set('install_profile', 'standard');