apimanagement / drupalportal

Drupal CMS APIM Developer Portal
GNU General Public License v2.0
11 stars 4 forks source link

Error on profile install: link_path cannot be null #5

Closed malcomio closed 9 years ago

malcomio commented 9 years ago

When trying to run the installation, after fixing #3 the installation fails with the following error:

exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'link_path' cannot be null' in /var/www/drupal7/includes/database/database.inc:2176                                                                            [error]
Stack trace:
#0 /var/www/drupal7/includes/database/database.inc(2176): PDOStatement->execute(Array)
#1 /var/www/drupal7/includes/database/database.inc(683): DatabaseStatementBase->execute(Array, Array)
#2 /var/www/drupal7/includes/database/mysql/query.inc(36): DatabaseConnection->query('INSERT INTO {me...', Array, Array)
#3 /var/www/drupal7/includes/menu.inc(3166): InsertQuery_mysql->execute()
#4 /var/www/drupal7/profiles/apim_profile/apim_profile.install(464): menu_link_save(Array)
chrisdudley commented 9 years ago

That module (and page_manager) is enabled in apim_profile.install as about the first operation it does. How come that hasn't happened for you?

chrisdudley commented 9 years ago

Have you made any changes to the install profile locally? An error about link_path not being null when the code has it explicitly set to 'plan' at that point is rather odd. I wondered if you'd made any changes ?

chrisdudley commented 9 years ago

Closing as I suspect you've made changes locally that have caused these issues. I cannot reproduce them myself. The required 'submodules' are all enabled in apim_profile_install(). Only the top level module directories are listed explicitly in the dependencies (this seems consistent with all other drupal install profiles I have seen).

malcomio commented 9 years ago

The only change after cloning was moving the profile into the profiles directory, the theme into sites/all/themes directory, and the modules into sites/all/modules

The error occurred when running drush site-install, on Drupal 7.38 - I haven't tried installing via the UI.

chrisdudley commented 9 years ago

I assume you're using latest drupal core ? 7.38 ? And latest drush too for that matter. As we too do our installs using drush site-install so I'm curious what the difference is.

chrisdudley commented 9 years ago

Have you tried using the distribution zip/tgz attached to the 4020 release? That will include all required modules, drupal core, etc....

evanskinner commented 9 years ago

Actually we've only tested it with provision-install as we use aegir (the provision bit, not the hostmaster) to manage the sites. I guess site-install is for managing multi site installations when you are not using aegir. I'm surprised there this doesn't work using site-install though.

Installing via the UI should certainly work as we have done this many times. Also the error seems improbable as it is complaining a db columns is being set to NULL when the code passes in a string constant for that column!

Good point Chris - Malcolm, please can you try to full distribution tgz/zip and see what difference that makes.

evanskinner commented 9 years ago

Hang on, re-reading this, are you saying you took Drupal 7, added the ibm modules and profile to it and then ran the site-install? Wouldn't we expect that to fail as you won't have all the sub-modules that we require? The distribution certainly should help here.

evanskinner commented 9 years ago

I may have spoken half truths in those past two posts. We have done installs with site-install but usually do full aegir multi-site installs with provision-install. so site install will work once you have all the dependant modules, such as if you use the distribution tgz/zip

malcomio commented 9 years ago

The way I was testing was:

Will try the distribution zip when I get a chance.

evanskinner commented 9 years ago

OK. We always build (drush make) the distribution and then do the installs from that, so it is entirely possible that we have something missing out of our declared module dependencies that could be causing this. Chris is going to attach the drupal make file for our distribution so that might help pin point any differences in what we build in for the distribution and what we have declared in the module/profile.

malcomio commented 9 years ago

thanks - was going to suggest adding the make file to the repo

chrisdudley commented 9 years ago

Done: https://github.com/apimanagement/drupalportal/blob/master/drupal-org.make