If I try to install the manuscript solution pack from scratch I get an unauthorized 401 error. If I disable the module, uninstall it, and then enable it again, I get the error again. If I disable the module but don't uninstall it and then enable it, I don't get the error. But, the solution pack's required objects aren't installed. If I go into the Web interface (admin/islandora/solution_pack_config/solution_packs) and install them, they install fine.
Here is the command line process:
vagrant@islandora:/var/www/drupal$ drush en islandora_manuscript
The following extensions will be enabled: islandora_manuscript
Do you really want to continue? (y/n): y
WD islandora: Failed to ingest object: islandora:findingAidCModelcode: 401message: Unauthorized [error]
WD php: RepositoryException: Unauthorized in RepositoryConnection->parseFedoraExceptions() (line 229 of [error]
/var/www/drupal/sites/all/libraries/tuque/RepositoryConnection.php).
Cannot modify header information - headers already sent by (output started at /usr/share/php/drush/includes/output.inc:37) bootstrap.inc:1232 [warning]
RepositoryException: Unauthorized in RepositoryConnection->parseFedoraExceptions() (line 229 of /var/www/drupal/sites/all/libraries/tuque/RepositoryConnection.php).
Drush command terminated abnormally due to an unrecoverable error. [error]
vagrant@islandora:/var/www/drupal$ drush dis islandora_manuscript
The following extensions will be disabled: islandora_manuscript
Do you really want to continue? (y/n): y
islandora_manuscript was disabled successfully. [ok]
vagrant@islandora:/var/www/drupal$ drush pm-uninstall islandora_manuscript
The following modules will be uninstalled: islandora_manuscript
Do you really want to continue? (y/n): y
islandora_manuscript was successfully uninstalled. [ok]
vagrant@islandora:/var/www/drupal$ drush en islandora_manuscript
The following extensions will be enabled: islandora_manuscript
Do you really want to continue? (y/n): y
WD islandora: Failed to ingest object: islandora:findingAidCModelcode: 401message: Unauthorized [error]
WD php: RepositoryException: Unauthorized in RepositoryConnection->parseFedoraExceptions() (line 229 of [error]
/var/www/drupal/sites/all/libraries/tuque/RepositoryConnection.php).
Cannot modify header information - headers already sent by (output started at /usr/share/php/drush/includes/output.inc:37) bootstrap.inc:1232 [warning]
RepositoryException: Unauthorized in RepositoryConnection->parseFedoraExceptions() (line 229 of /var/www/drupal/sites/all/libraries/tuque/RepositoryConnection.php).
Drush command terminated abnormally due to an unrecoverable error. [error]
vagrant@islandora:/var/www/drupal$ drush dis islandora_manuscript
The following extensions will be disabled: islandora_manuscript
Do you really want to continue? (y/n): y
islandora_manuscript was disabled successfully. [ok]
vagrant@islandora:/var/www/drupal$ drush en islandora_manuscript
The following extensions will be enabled: islandora_manuscript
Do you really want to continue? (y/n): y
islandora_manuscript was enabled successfully. [ok]
After the solution pack objects have been installed, if I go back in from the command line and disable the module, uninstall it, and then enable it again, I get:
islandora_manuscript was enabled successfully. [ok]
islandora_manuscript: Did not install Finding Aid Content Model. The object already exists and is up-to-date. [warning]
islandora_manuscript: Did not install Manuscript Content Model. The object already exists and is up-to-date. [warning]
islandora_manuscript: Did not install Manuscript Page Content Model. The object already exists and is up-to-date. [warning]
islandora_manuscript: Did not install Transform Content Model. The object already exists and is up-to-date. [warning]
islandora_manuscript: Did not install Manuscript Collection. The object already exists and is up-to-date. [warning]
islandora_manuscript: Did not install Transform Collection. The object already exists and is up-to-date. [warning]
islandora_manuscript: Did not install Default Transform. The object already exists and is up-to-date. [warning]
Shouldn't those be uninstalled when the module is uninstalled?
Is all this the expected behavior? Things are fine when it's been installed and the solution pack objects have been loaded through the Web UI -- the module acts the way you'd expect it, but the installation and de-installation process, and its errors, don't seem right to me. Fwiw, I'm testing it on the Islandora Vagrant machine.
My install script is:
JSTREE_VERSION=3.0.0
DRUPAL_HOME=/var/www/drupal
# Download the manuscript solution pack and its module dependencies
cd $DRUPAL_HOME/sites/all/modules
git clone https://github.com/discoverygarden/islandora_solution_pack_manuscript.git
git clone https://github.com/discoverygarden/islandora_paged_tei_seadragon.git
git clone https://github.com/discoverygarden/islandora_rest.git
# Install JSTree, a library dependency of the manuscript solution pack
wget -O /tmp/jstree-$JSTREE_VERSION.zip https://github.com/vakata/jstree/archive/$JSTREE_VERSION.zip
unzip -d /tmp /tmp/jstree-$JSTREE_VERSION.zip
mkdir $DRUPAL_HOME/sites/all/libraries/jstree
mv /tmp/jstree-$JSTREE_VERSION/dist $DRUPAL_HOME/sites/all/libraries/jstree
# Install the manuscript solution pack module
drush -y en islandora_manuscript
Tagging @kjallen on this since he said he'd seen this behavior too.