Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291609

Special handling for setting the BreakpointGroup::breakpoints property during ConfigStorageController::importChange()

$
0
0

during config import, the BreakpointGroup entity's loadAllBreakpoints() method is called before the breakpoints property is populated with values from it's config object.

the import code sets the BreakpointGroup::breakpoints with the simple list of breakpoint names from the config file, which breaks any code assuming BreakpointGroup::breakpoints has a list of loaded Breakpoint objects in it.

the BreakpointGroup::save() method is code that assumes BreakpointGroup::breakpoints is fully loaded with objects, so it saves the array keys only to the config file.

thus, when BreakpointGroup::save() is called during import, we save:

id: module.toolbar.toolbar
uuid: e55f6e1d-ba89-470d-9901-1fd2fcf5692f
name: toolbar
label: toolbar
breakpoints:
  - '0'
  - '1'
  - '2'
source: toolbar
sourceType: module
status: '1'
langcode: und

instead of:

id: module.toolbar.toolbar
uuid: e55f6e1d-ba89-470d-9901-1fd2fcf5692f
name: toolbar
label: toolbar
breakpoints:
  - module.toolbar.narrow
  - module.toolbar.standard
  - module.toolbar.wide
source: toolbar
sourceType: module
status: '1'
langcode: und

cool story, huh?

so this patch adds special handling to BreakpointGroup::set() when the property is 'breakpoints', to ensure that we always load the Breakpoint config entities into BreakpointGroup::breakpoints.

not at all sure if this is the right approach, but kim.pepper and boztek and i spent half a day tracking it down at the sydney code sprint.

AttachmentSizeStatusTest resultOperations
breakpoint.patch1.23 KBIdleFAILED: [[SimpleTest]]: [MySQL] 52,631 pass(es), 141 fail(s), and 28 exception(s).View details | Re-test

Viewing all articles
Browse latest Browse all 291609

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>