Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of Drupal 8.4.4 with SubProfile throws exception #184

Closed
jasonrsavino opened this issue Feb 6, 2018 · 9 comments
Closed

Installation of Drupal 8.4.4 with SubProfile throws exception #184

jasonrsavino opened this issue Feb 6, 2018 · 9 comments

Comments

@jasonrsavino
Copy link

Additional uncaught exception thrown while handling exception.
Original
Drupal\Core\Config\PreExistingConfigException: Configuration objects (system.theme) provided by system already exist in active configuration in Drupal\Core\Config\PreExistingConfigException::create() (line 65 of /var/www/web/core/lib/Drupal/Core/Config/PreExistingConfigException.php).

Drupal\Core\Config\PreExistingConfigException::create('system', Array) (Line: 492)
Drupal\Core\Config\ConfigInstaller->checkConfigurationToInstall('module', 'system') (Line: 132)
Drupal\Core\ProxyClass\Config\ConfigInstaller->checkConfigurationToInstall('module', 'system') (Line: 145)
Drupal\Core\Extension\ModuleInstaller->install(Array, ) (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, ) (Line: 635)
drupal_install_system(Array) (Line: 1050)
install_base_system(Array) (Line: 677)
install_run_task(Array, Array) (Line: 555)
install_run_tasks(Array) (Line: 117)
install_drupal(Object) (Line: 44)
Additional
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'default.key_value' doesn't exist: SELECT 1 AS expression FROM {key_value} key_value WHERE (name = :db_condition_placeholder_0) AND (collection = :db_condition_placeholder_1); Array ( [:db_condition_placeholder_0] => system.theme.files [:db_condition_placeholder_1] => state ) in Drupal\Core\State\State->set() (line 71 of /var/www/web/core/lib/Drupal/Core/State/State.php).

Drupal\Core\State\State->set('system.theme.files', Array) (Line: 337)
Drupal\Core\Extension\ThemeHandler->rebuildThemeData() (Line: 73)
_drupal_maintenance_theme() (Line: 724)
drupal_maintenance_theme() (Line: 978)
install_display_output(Array, Array, Array) (Line: 264)
_drupal_log_error(Array, 1) (Line: 584)
_drupal_exception_handler(Object)

The patch being used is incorrect. Drupal 8.4.4 needs to use the patch here: https://www.drupal.org/files/issues/1356276-419--8.4.4.patch

@eguerin-ucsf
Copy link
Collaborator

Ok this issue might also be related to #183

@eguerin-ucsf
Copy link
Collaborator

Maybe we should try the patch at the end that seemed to pass most cases?

https://www.drupal.org/files/issues/1356276-291.patch

@eguerin-ucsf
Copy link
Collaborator

eguerin-ucsf commented Feb 8, 2018

Seems like no matter what it picks up the first profile in the profiles directory, puts that information into the database cache tables as well as config. Then checks to make sure the profile name is set into the $profiles array and if not, then throws the error.

But its always coming up with something other then system first.

if (!isset($profiles[$name])) {

If you look at the returned result of
$profiles = $this->profileHandler->getProfileInheritance();

The results look like this:
`
Array
(
[lightning] => Drupal\Core\Extension\Extension Object
(
[type:protected] => profile
[pathname:protected] => profiles/contrib/lightning/lightning.info.yml
[filename:protected] => lightning.profile
[splFileInfo:protected] =>
[root:protected] => /Users/eguerin/Sites/ucsf8/docroot
[info] => Array
(
[name] => Lightning
[core] => 8.x
[type] => profile
[description] => A fast and feature-rich Drupal distribution.
[version] => 8.x-3.001
[distribution] => Array
(
[name] => Lightning
)
[dependencies] => Array
(
[0] => block_content
... TRUNCATED FOR BREVITY
)
[themes] => Array
(
[0] => bartik
[1] => seven
)
[project] => lightning
[datestamp] => 1515083429
[hidden] =>
[php] => 5.5.9
[base profile] => Array
(
[name] =>
[excluded_dependencies] => Array()
[excluded_themes] => Array()
)
[profile_list] => Array
(
[lightning] => lightning
)
)
[origin] =>
[weight] => 1000
)

)
`

Shouldn't the array be complete with all profiles being returned with the name of the profile as the key from the $this->profileHandler->getProfileInheritance function? THIS IS A NON-ISSUE PROFILE is selected because its the first Distribution in Alphabetical order.

@eguerin-ucsf
Copy link
Collaborator

eguerin-ucsf commented Feb 8, 2018

Even if I pick a different profile in the settings.php it goes and installs the cache_container data as though its installing lightning here. The current profile should be system at this point, since I have yet to pick out or install a profile.

I forced it to think it was installing sitefarm_subprofile, but again I get the same error. It set the cache_container data column to include the sitefarm_subprofile but at this stage of the installation it really shouldn't be inserting data into the database and the only profile it should be referring to is the system only.

@eguerin-ucsf
Copy link
Collaborator

Some additional notes, Drupal seems to pick whatever the first "Distribution" is in the list. So in this case Lightning, this is why you never end up on the "Select a Profile" page. I think this is a bad decision especially if you have multiple distro's in the your profile folder.

Also the error happens regardless of how many profiles are available to install, seems to be something in the installation process where its prepping the database but then tries to do it twice.

@devnich
Copy link

devnich commented Feb 14, 2018

I can confirm that this is happening on 8.4.2 as well. I have two subprofiles in the /profiles directory, "sitefarm_subprofile" and "ucmerced_subprofile". The sitefarm_subprofile is always installed if it's present. Once I remove it, the second subprofile is installed instead. I never see a "Select a Profile" page.

@dsnopek
Copy link

dsnopek commented Jun 11, 2018

I'm still seeing this with 8.5.4. I made an issue here:

ucdavis/sitefarm-distro-template#21

Not sure if that one should be closed in favor of this one?

@mrkmiller
Copy link
Contributor

#188 I believe resolves this.

@mrkmiller
Copy link
Contributor

#198 has everything working with 8.6. I assume people are now on that version so am closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants