Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
field_collection
Commits
5f127681
Commit
5f127681
authored
May 31, 2019
by
kidrobot
Committed by
Ra Mänd
May 31, 2019
Browse files
Issue #3043573 by hitfactory: Submitting entityform generates Notice for undefined $nid
parent
3daeb1ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
field_collection.entity.inc
View file @
5f127681
...
...
@@ -325,10 +325,14 @@ class FieldCollectionItemEntity extends Entity {
if
(
$hostEntity
)
{
$entity_type
=
key
(
$field_info
[
'bundles'
]);
$bundle
=
current
(
$field_info
[
'bundles'
][
$entity_type
]);
$entity_info
=
entity_get_info
(
$entity_type
);
$key
=
$entity_info
[
'entity keys'
][
'id'
];
$query
->
entityCondition
(
'entity_type'
,
$entity_type
);
$query
->
entityCondition
(
'entity_id'
,
$hostEntity
->
nid
);
$query
->
entityCondition
(
'entity_id'
,
$hostEntity
->
{
$key
}
);
$query
->
entityCondition
(
'bundle'
,
$bundle
);
$query
->
propertyCondition
(
'language'
,
$hostEntity
->
language
);
if
(
isset
(
$entity_info
[
'entity keys'
][
'language'
]))
{
$query
->
propertyCondition
(
'language'
,
$hostEntity
->
language
);
}
}
$query
->
addTag
(
'DANGEROUS_ACCESS_CHECK_OPT_OUT'
);
if
(
!
$this
->
isInUse
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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