When installing the lightning media image module, the installation fails with this error:
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /core/install.php?rewrite=ok&profile=lightning&langcode=en&id=1&op=do_nojs&op=do
StatusText: OK
ResponseText: Drupal\Core\Config\PreExistingConfigException: Configuration objects (core.entity_form_display.media.image.default, core.entity_view_display.media.image.default, media.type.image) provided by lightning_media_image already exist in active configuration in Drupal\Core\Config\PreExistingConfigException::create() (line 65 of /app/docroot/core/lib/Drupal/Core/Config/PreExistingConfigException.php).
On proceeding, this is the stacktrace dump as reported in the logs:
Drupal\Core\Config\PreExistingConfigException: Configuration objects (core.entity_form_display.media.image.default, core.entity_view_display.media.image.default, media.type.image) provided by lightning_media_image already exist in active configuration in Drupal\Core\Config\PreExistingConfigException::create() (line 65 of /var/www/project/docroot/core/lib/Drupal/Core/Config/PreExistingConfigException.php)
#0 /var/www/project/docroot/core/lib/Drupal/Core/Config/ConfigInstaller.php(492): Drupal\Core\Config\PreExistingConfigException::create('lightning_media...', Array)
#1 /var/www/project/docroot/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php(132): Drupal\Core\Config\ConfigInstaller->checkConfigurationToInstall('module', 'lightning_media...')
#2 /var/www/project/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php(145): Drupal\Core\ProxyClass\Config\ConfigInstaller->checkConfigurationToInstall('module', 'lightning_media...')
#3 /var/www/project/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Array, false)
#4 /var/www/project/docroot/core/includes/install.core.inc(1813): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, false)
#5 /var/www/project/docroot/core/includes/batch.inc(294): _install_module_batch('lightning_media...', 'Media Image', Array)
#6 /var/www/project/docroot/core/includes/batch.inc(137): _batch_process()
#7 /var/www/project/docroot/core/includes/batch.inc(93): _batch_do()
#8 /var/www/project/docroot/core/includes/install.core.inc(647): _batch_page(Object(Symfony\Component\HttpFoundation\Request))
#9 /var/www/project/docroot/core/includes/install.core.inc(555): install_run_task(Array, Array)
#10 /var/www/project/docroot/core/includes/install.core.inc(117): install_run_tasks(Array)
#11 /var/www/project/docroot/core/install.php(44): install_drupal(Object(Composer\Autoload\ClassLoader))
#12 {main}.
There seems to be a related patch in #2928123: Configuration broken: Zombie media_type_file for media_entity module but that didn't help. This happens both for directly installing the Lightning profile or a subprofile.
Comments
Comment #2
miteshmap@hussainweb: Upgrading your local patch version and running composer install again will resolve this issue. Patch version must be 2.7.5 or greater: https://docs.acquia.com/article/fixing-failing-composer-patches-updating...
Comment #3
hussainweb@miteshmap, thanks for replying. Can you clarify this further? Which patch are you referring to?
Comment #4
miteshmap@hussainweb, the patch on you local machine. If you type "patch --version" in your terminal. it may be 2.5.* . While there's a patch in lightning which applies in core to avoid this conflict. which requires patch version 2.7.5 or greater.
Comment #5
hussainwebAh, I see. I don't remember any errors while patching but I am going to try this out and let you know. Thanks.
Comment #6
hussainwebThis works. Thanks!
I'd strongly recommend documenting this on the project page. I searched quite a bit but didn't find anything.
Comment #7
miteshmapAwesome :) yes, this needs to be documented in lightning.
Comment #8
nikunjkotechahttps://docs.acquia.com/article/fixing-failing-composer-patches-updating...
Comment #9
balsamaThis has to do with upstream dependencies and is documented here as pointed out in #8. Thanks!
Comment #10
hussainweb@balsama, acknowledged. I suggest putting this on project page so that it is possible to find it. I had no idea that
patchwas failing, so did not know to check on whypatchis failing. Putting this on project page makes it easy to find. One idea is to have a section called Known issues or something similar.