Hi
I've been teaching myself the ropes on Drupal since November 2011, using Drupal 7 and the zen theme. I'm using a Debian platform.
I've done upgrades on the installation, and being new to it, I may have got things wrong as I started getting error messages showing up. I couldn't find anything in the documentation or bug reports that I could find, so I figured I must have made a mistake somewhere, saved what I needed to and purged Drupal off the system.
I then re-installed it without going through the database set up at install time figuring I could run install.php and reset the db access there. I'd like to know if that is a reasonable expectation, please.
On running http://localhost/drupal7/install.php I get this error:
Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 196 of /usr/share/drupal7/includes/install.inc).
The rest of the installation profile selection form is displayed so it's not a complete show stopper.
The code appears to return $install_state['profile_info']['distribution_name'] or $info['distribution_name'] when the value for the 'distribution_name' index hasn't been defined. The only place that value seems to be defined is in the install_profile_info function and it is initialised into the $info array not the $install_state array.
The install_state_defaults function returns an empty array for the profile_info index and the only place I can find $install_state['profile_info']['distribution_name'] explicitly mentioned is when it is returned from the drupal_install_profile_distribution_name function.
The install_profile_info function is called before the form is set up in install_select_profile_form which is called from install_select_profile with the $install_state['profiles'] array.
I'm left hoping the error won't influence the install.
Can anyone please comment on this error - safe or unsafe - just a code bug or an indication of a problem?
Thanks in advance for any help.
lesleyb
Comments
I've found this bug report
I've found this bug report http://drupal.org/node/1508278#comment-5867986
which looks astoundingly similar so I have added my bug report and linked this node in.
discovered error
I proceeded with the install and it fell over on another page by which I was able to resolve permission problems on settings.php. I also set the content of dbconfig.php and the error does not occur again.
My guess would be that this
My guess would be that this is almost certainly because you're starting with a populated database.
There's more posts on the subject, but this comment seems to explain a suspected cause which will probably be fixed in D8 before it gets fixed in D7:
https://drupal.org/node/1170362#comment-4563660
I'd suggest you try the install on a second database, before wiping your proper one.
Current install behaviour on Debian wheezy
I studied this behaviour a little more -
1. Purged existing drupal7 install and re-installed without configuring the database at install time.
Started localhost/drupal7/install.php and got this error appearing on first page - selecting standard or minimal installation mode.
Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 196 of /usr/share/drupal7/includes/install.inc).
2. Still there when selecting language.
Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 196 of /usr/share/drupal7/includes/install.inc).
3. Still there at requiements check.
Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 196 of /usr/share/drupal7/includes/install.inc).
Also now get errors on lack of db detail
Notice: Undefined offset: 5 in Database::parseConnectionInfo() (line 1510 of /usr/share/drupal7/includes/database/database.inc).
Notice: Undefined index: driver in Database::openConnection() (line 1662 of /usr/share/drupal7/includes/database/database.inc).
Plus complaints about the default.settings.php and settings.php files:
Default settings file The default settings file does not exist.
The Drupal installer requires that the ./sites/default/default.settings.php file not be modified in any way from the original download.
Settings file The settings file is not writable.
The Drupal installer requires write permissions to ./sites/default/settings.php during the installation process. If you are unsure how to grant file permissions, consult the online handbook.
4. Created a db drupaltest1 and granted privileges : from mysql
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON drupaltest1.* TO 'drupaluser'@'localhost'
Edited dbconfig.php in /etc/drupal7/sites/default/dbconfig.php to contain the database driver, name, user and password details.
5. Refreshed the requirements page and progressed automatically to the database setup but got fourteen (14) of these:
Warning: preg_match(): Compilation failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 2112 in truncate_utf8() (line 339 of /usr/share/drupal7/includes/unicode.inc).
See :
http://drupal.org/node/1442876
http://drupal.org/node/1446372
http://drupal.org/node/1444006
The installation appear to successfully create the database tables.
6. Progressed to next stage, configuring the site but with this error
Notice: Array to string conversion in menu_link_save() (line 3155 of /usr/share/drupal7/includes/menu.inc).
a number of times - one of the nodes below counted >400 repeats.
See :
http://drupal.org/node/1479236
http://drupal.org/node/1338282
http://drupal.org/node/1477646
https://bugs.php.net/bug.php?id=60198
and the related
http://drupal.org/node/1342216
This problem needs a patch and a multitude are available at
http://drupal.org/node/1338282. All downloaded to patches.120425/138282.
The spirit of the patches is to replace array_interset_assoc with
array_intersect_key on the two lines it appears in includes/menu.inc. - lines
3152 and 3155 in Debian wheezy drupal7 istallation.
A page refresh after applying this patch removes the Array to string conversion
errors.
7. Proceed with install and declare site information. Now get these errors:
Warning: preg_match(): Compilation failed: disallowed Unicode code point (>=
0xd800 && <= 0xdfff) at offset 2112 in truncate_utf8() (line 339 of
/usr/share/drupal7/includes/unicode.inc).
and a number of :
Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line
1901 of /usr/share/drupal7/includes/database/query.inc).
See:
above for preg_match utf8 problem.
and, for the database _clone problem
http://drupal.org/node/1483986 (for sqlite only)
http://drupal.org/node/1467776 ( a duplicate of 1414412 )
http://drupal.org/node/1414412
The _clone method problem shows when displaying the front page. Patch applied and error is removed.
I am pleased I have managed to identify the install problems created by not creating a database first.
So the problems 1-4 were of my own creation, the remainder - the ones I had encountered before, were bugs requiring patches on my platform.
Now all I need to do is try and re-use my previous database.