Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
After pulling the branch, I've tried to install sharemessage_demo in two different machines/systems, still got an error, and the module is not enabled, but if you do it manually through the UI everything looks fine except for the demo content that is not installed. Pasted the error message trying to enable the demo module via drush
Clean branch:
exception 'Drupal\Core\Config\PreExistingConfigException' with message 'Configuration objects (core.entity_form_display.node.sharecontent.default, core.entity_view_display.node.sharecontent.default, [error] field.field.node.sharecontent.body, node.type.sharecontent, sharemessage.sharemessage.share_message_addthis_demo) provided by sharemessage_demo already exist in active configuration' in /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/Config/PreExistingConfigException.php:65 Stack trace: #0 /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/Config/ConfigInstaller.php(471): Drupal\Core\Config\PreExistingConfigException::create('sharemessage_de...', Array) #1 /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php(132): Drupal\Core\Config\ConfigInstaller->checkConfigurationToInstall('module', 'sharemessage_de...') #2 /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/Extension/ModuleInstaller.php(141): Drupal\Core\ProxyClass\Config\ConfigInstaller->checkConfigurationToInstall('module', 'sharemessage_de...') #3 /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Array, true) #4 /usr/local/source/drush/commands/core/drupal/environment.inc(131): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, true) #5 /usr/local/source/drush/commands/core/drupal/environment.inc(198): drush_module_install(Array) #6 /usr/local/source/drush/commands/pm/pm.drush.inc(1167): drush_module_enable(Array) #7 [internal function]: drush_pm_enable('sharemessage_de...') #8 /usr/local/source/drush/includes/command.inc(366): call_user_func_array('drush_pm_enable', Array) #9 /usr/local/source/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array) #10 [internal function]: drush_command('sharemessage_de...') #11 /usr/local/source/drush/includes/command.inc(185): call_user_func_array('drush_command', Array) #12 /usr/local/source/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array) #13 /usr/local/source/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch() #14 /usr/local/source/drush/drush.php(12): drush_main() #15 {main}
Branch with a patch applied (not sure if this is a useful info...):
exception 'Symfony\Component\Routing\Exception\RouteNotFoundException' with message 'Route "sharemessage.settings.settings" does not exist.' in /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/Routing/RouteProvider.php:187 [error] Stack trace: #0 /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/Routing/UrlGenerator.php(425): Drupal\Core\Routing\RouteProvider->getRouteByName('sharemessage.se...') #1 /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/Routing/UrlGenerator.php(277): Drupal\Core\Routing\UrlGenerator->getRoute('sharemessage.se...') #2 /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php(105): Drupal\Core\Routing\UrlGenerator->generateFromRoute('sharemessage.se...', Array, Array, true) #3 /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/Url.php(735): Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('sharemessage.se...', Array, Array, false) #4 /usr/local/var/www/d8.dev/www/modules/sharemessage/modules/sharemessage_demo/sharemessage_demo.install(26): Drupal\Core\Url->toString() #5 [internal function]: sharemessage_demo_install() #6 /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/Extension/ModuleHandler.php(391): call_user_func_array('sharemessage_de...', Array) #7 /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/Extension/ModuleInstaller.php(287): Drupal\Core\Extension\ModuleHandler->invoke('sharemessage_de...', 'install') #8 /usr/local/var/www/d8.dev/www/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Array, true) #9 /usr/local/source/drush/commands/core/drupal/environment.inc(131): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, true) #10 /usr/local/source/drush/commands/core/drupal/environment.inc(198): drush_module_install(Array) #11 /usr/local/source/drush/commands/pm/pm.drush.inc(1167): drush_module_enable(Array) #12 [internal function]: drush_pm_enable('sharemessage_de...') #13 /usr/local/source/drush/includes/command.inc(366): call_user_func_array('drush_pm_enable', Array) #14 /usr/local/source/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array) #15 [internal function]: drush_command('sharemessage_de...') #16 /usr/local/source/drush/includes/command.inc(185): call_user_func_array('drush_command', Array) #17 /usr/local/source/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array) #18 /usr/local/source/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch() #19 /usr/local/source/drush/drush.php(12): drush_main() #20 {main}
Don't know why the fix from #2718759: Follow up for Share Message Demo cleanups is not working...
Proposed resolution
- find the bug
- upload the patch
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | cannot_enable_SM_demo-2752111-2.patch | 696 bytes | tduong |
|
Comments
Comment #2
tduong CreditAttribution: tduong at MD Systems GmbH commentedThe bug doesn't appear anymore if the sharemessage module is enabled first and then the sharemessage_demo one (separately). As what appears after
drush en sharemessage_demo -y
, , the demo module is enabled first and then the sharemessage, which caused a "conflict" so we need a router rebuild insharemessage_demo_install()
. Done.Comment #3
BerdirDon't understand why this is needed but it's just a demo module, so I don't care that much.
Committed.