Problem/Motivation
Draggable Dashboard module breaks Configuration Synchronization functionality.
While using Draggable Dashboard with drush config-export
or the Configuration synchronization section built into Drupal 8, the configuration generated by Drupal will not import. This occurs because the configuration exported includes the blocks added to the dashboard (as expected), however the block configurations also include an empty theme dependency. When one tries to import configuration including configuration exported from Draggable Dashboard, the import errors out indicating that the theme (with an empty name) does not exist.
Example configuration export of a block added to a Draggable Dashboard:
uuid: 3a7bed18-1d7b-4883-a2df-330d1c6fe4c2
langcode: en
status: false
dependencies:
module:
- system
theme:
= ""
id: poweredbydrupal
theme: ''
region: draggable_dashboard_region
weight: null
provider: null
plugin: system_powered_by_block
settings:
id: system_powered_by_block
label: 'Powered by Drupal'
provider: system
label_display: '0'
visibility: { }
Proposed resolution
Find a way to override configuration exports for blocks included in Dashboard entities to exclude the theme dependency. The example from above should instead appear like:
uuid: 3a7bed18-1d7b-4883-a2df-330d1c6fe4c2
langcode: en
status: false
dependencies:
module:
- system
id: poweredbydrupal
theme: ''
region: draggable_dashboard_region
weight: null
provider: null
plugin: system_powered_by_block
settings:
id: system_powered_by_block
label: 'Powered by Drupal'
provider: system
label_display: '0'
visibility: { }
Comments
Comment #2
rbrownellComment #3
cmd87 CreditAttribution: cmd87 at 1xINTERNET commentedComment #4
sanduhrsChanging https://cgit.drupalcode.org/draggable_dashboard/tree/src/Form/DashboardM...
from
$block->set('theme', '');
to
$block->set('theme', 'seven');
does actually solve the problem.
Comment #6
cmd87 CreditAttribution: cmd87 at 1xINTERNET commentedThanks guys! Patch applied.
Comment #7
cmd87 CreditAttribution: cmd87 at 1xINTERNET commentedComment #8
cmd87 CreditAttribution: cmd87 at 1xINTERNET commented