Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
field_collection
Commits
8d29cabe
Commit
8d29cabe
authored
Mar 26, 2021
by
hadsie
Committed by
Renato Gonçalves H
Mar 26, 2021
Browse files
Issue #3205186 by hadsie, RenatoG: Avoid updating non-draft content when using drafty
parent
373fbede
Changes
1
Hide whitespace changes
Inline
Side-by-side
field_collection.module
View file @
8d29cabe
...
...
@@ -575,6 +575,11 @@ function field_collection_field_update($host_entity_type, $host_entity, $field,
if
(
!
empty
(
$top_host
->
workbench_moderation
[
'updating_live_revision'
]))
{
return
;
}
// Don't modify the field collections if using drafty and this is not a
// draft revision.
if
(
module_exists
(
'drafty'
)
&&
empty
(
$top_host
->
is_draft_revision
))
{
return
;
}
// Load items from the original entity.
$items_original
=
!
empty
(
$original
->
{
$field
[
'field_name'
]}[
$langcode
])
?
$original
->
{
$field
[
'field_name'
]}[
$langcode
]
:
array
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment