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
!8102
Draft: quick patch for surfacing/recording migrate_lookup stub row skips
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Closed
Draft: quick patch for surfacing/recording migrate_lookup stub row skips
issue/drupal-3447713:3447713-allow-migratestub-class
into
10.4.x
Overview
1
Commits
2
Pipelines
2
Changes
1
Closed
Draft: quick patch for surfacing/recording migrate_lookup stub row skips
Adamo Maisano
requested to merge
issue/drupal-3447713:3447713-allow-migratestub-class
into
10.4.x
May 16, 2024
Overview
1
Commits
2
Pipelines
2
Changes
1
Closes
#3447713
0
0
Merge request reports
Compare
10.4.x
version 2
16c39d2d
May 20, 2024
version 1
16c39d2d
May 16, 2024
10.4.x (base)
and
latest version
latest version
c37339b9
2 commits,
May 20, 2024
version 2
16c39d2d
1 commit,
May 20, 2024
version 1
16c39d2d
1 commit,
May 16, 2024
1 file
+
27
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
core/modules/migrate/src/MigrateStub.php
+
27
−
1
View file @ c37339b9
Edit in single-file editor
Open in Web IDE
Show full file
@@ -109,7 +109,33 @@ protected function doCreateStub(MigrationInterface $migration, array $source_ids
$id_map
=
$migration
->
getIdMap
();
$migrate_executable
=
new
MigrateExecutable
(
$migration
);
$row
=
new
Row
(
$source_ids
+
$migration
->
getSourceConfiguration
(),
$migration
->
getSourcePlugin
()
->
getIds
(),
TRUE
);
$migrate_executable
->
processRow
(
$row
,
$process
);
try
{
$migrate_executable
->
processRow
(
$row
,
$process
);
}
catch
(
MigrateSkipRowException
$e
)
{
if
(
$e
->
getSaveToMap
())
{
$id_map
->
saveIdMapping
(
$row
,
[],
MigrateIdMapInterface
::
STATUS_IGNORED
);
}
if
(
$message
=
trim
(
$e
->
getMessage
()))
{
// Figure out the destination key that failed:
$current_destination_key
=
[];
foreach
(
$process
as
$destination_key
=>
$destination_value
)
{
if
(
!
array_key_exists
(
$destination_key
,
$row
->
getDestination
()))
{
$current_destination_key
=
$destination_key
;
break
;
}
}
$msg
=
sprintf
(
"%s:%s: %s"
,
$migration
->
getPluginId
(),
$current_destination_key
,
$message
);
$id_map
->
saveMessage
(
$row
->
getSourceIdValues
(),
$msg
,
MigrationInterface
::
MESSAGE_INFORMATIONAL
);
}
return
FALSE
;
}
foreach
(
$default_values
as
$key
=>
$value
)
{
$row
->
setDestinationProperty
(
$key
,
$value
);
}
Loading