Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
field_tools-3101038
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
field_tools-3101038
Commits
a3cafc77
Commit
a3cafc77
authored
4 years ago
by
Arthur Lorenz
Committed by
Joachim Noreiko
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2849461
by arthur_lorenz: Fixed field config not getting updated on cloned fields.
parent
786fe503
No related branches found
Branches containing commit
Tags
7.x-2.6
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/FieldCloner.php
+5
-0
5 additions, 0 deletions
src/FieldCloner.php
with
5 additions
and
0 deletions
src/FieldCloner.php
+
5
−
0
View file @
a3cafc77
...
...
@@ -98,6 +98,11 @@ class FieldCloner {
$new_field_config
=
$field_config
->
createDuplicate
();
if
(
$destination_entity_type_id
!=
$field_config_target_entity_type_id
)
{
$new_field_config
->
set
(
'entity_type'
,
$destination_entity_type_id
);
// Make the field use newly created storage.
if
(
isset
(
$new_field_storage_config
))
{
$new_field_config
->
set
(
'fieldStorage'
,
$new_field_storage_config
);
}
}
$new_field_config
->
set
(
'bundle'
,
$destination_bundle
);
$new_field_config
->
save
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment