Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!1424
Issue
#3250066
: Config import failing if language override is updated while original is recreated
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Open
Issue
#3250066
: Config import failing if language override is updated while original is recreated
issue/drupal-3250066:3250066-config-import-failing
into
9.5.x
Overview
0
Commits
3
Pipelines
0
Changes
2
Open
Issue #3250066: Config import failing if language override is updated while original is recreated
Bart Langelaan
requested to merge
issue/drupal-3250066:3250066-config-import-failing
into
9.5.x
Nov 18, 2021
Overview
0
Commits
3
Pipelines
0
Changes
2
0
0
Merge request reports
Compare
9.5.x
version 4
bc75463e
May 23, 2022
version 3
bc75463e
Mar 17, 2022
version 2
259cfff6
Nov 18, 2021
version 1
ca08c07e
Nov 18, 2021
9.5.x (base)
and
latest version
latest version
5b93c7eb
3 commits,
May 24, 2022
version 4
bc75463e
279 commits,
May 23, 2022
version 3
bc75463e
3 commits,
Mar 17, 2022
version 2
259cfff6
3 commits,
Nov 18, 2021
version 1
ca08c07e
1 commit,
Nov 18, 2021
2 files
+
136
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
core/lib/Drupal/Core/Config/StorageComparer.php
+
26
−
9
View file @ 5b93c7eb
Edit in single-file editor
Open in Web IDE
Show full file
@@ -248,17 +248,34 @@ protected function addChangelistUpdate($collection) {
foreach
(
array_intersect
(
$this
->
sourceNames
[
$collection
],
$this
->
targetNames
[
$collection
])
as
$name
)
{
$source_data
=
$this
->
getSourceStorage
(
$collection
)
->
read
(
$name
);
$target_data
=
$this
->
getTargetStorage
(
$collection
)
->
read
(
$name
);
if
(
$source_data
!==
$target_data
)
{
if
(
isset
(
$source_data
[
'uuid'
])
&&
$source_data
[
'uuid'
]
!==
$target_data
[
'uuid'
])
{
// The entity has the same file as an existing entity but the UUIDs do
// not match. This means that the entity has been recreated so config
// synchronization should do the same.
$recreates
[]
=
$name
;
}
else
{
$this
->
addChangeList
(
$collection
,
'update'
,
[
$name
]);
$recreate
=
FALSE
;
if
(
isset
(
$source_data
[
'uuid'
])
&&
$source_data
[
'uuid'
]
!==
$target_data
[
'uuid'
])
{
// The entity has the same file as an existing entity but the UUIDs do
// not match. This means that the entity has been recreated so config
// synchronization should do the same.
$recreate
=
TRUE
;
}
elseif
(
$collection
!==
StorageInterface
::
DEFAULT_COLLECTION
)
{
$default_source_data
=
$this
->
getSourceStorage
()
->
read
(
$name
);
$default_target_data
=
$this
->
getTargetStorage
()
->
read
(
$name
);
if
(
isset
(
$default_source_data
[
'uuid'
])
&&
$default_target_data
!==
FALSE
&&
$default_source_data
[
'uuid'
]
!==
$default_target_data
[
'uuid'
])
{
// This means that this file does have an update, but the default
// collection has the config of the same name marked as recreate.
// We should also mark this config as been recreated, because it
// will lead to errors if this is marked as 'updated' while the
// parent is recreated.
// See: https://www.drupal.org/project/drupal/issues/3250066
$recreate
=
TRUE
;
}
}
if
(
$recreate
)
{
$recreates
[]
=
$name
;
}
elseif
(
$source_data
!==
$target_data
)
{
$this
->
addChangeList
(
$collection
,
'update'
,
[
$name
]);
}
}
if
(
!
empty
(
$recreates
))
{
Loading