Problem/Motivation

When merging the build and layout build arrays, information is lost, for example data in the #source_contexts array.

Proposed resolution

Merge recursively instead on the two build arrays

Remaining tasks

Review and ensure this is desired behaviour

Issue fork ds-3529867

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dubs created an issue. See original summary.

dubs’s picture

swentel’s picture

Interesting, makes sense a lot! This is somewhat related to #2912149: Change layout templates to use content.region (with BC) also (but the idea there has a much bigger impact!).

I'm going to try and expand the patch and use a BC layer for this, because you never know there might be something subtle that changes, especially for sites which upgrade.

swentel’s picture

So tests are fine with array_merge_recursive, but added a BC layer just to be sure.

swentel’s picture

Status: Needs review » Fixed

Merged in!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

swentel’s picture

Status: Fixed » Closed (fixed)
mikemccaffrey’s picture

Well, this broke a field display on our site after upgrade. For some reason the update function did not run after we upgraded the module (did our schema version for the module get ahead for some reason?), and so the wrapper element we specified for a title field was not being applied on display.

Manually enabling the "Undo array_merge_recursive build fix" setting on the ds settings form seems to have solved the issue. Not sure if there is anything actionable to do, but I just thought I would mention it here if anyone else had similar issues.