When adding a content type field using field storage, I am getting the error:

Notice: Undefined property: EntityFieldQuery::$propertyConditions in mongodb_field_storage_query()

I am using a new installation of Drupal 7.34

Comments

maartendbr’s picture

Same here. Not only when adding a new content type field but also when editing an existing one.

Notice: Undefined property: EntityFieldQuery::$propertyConditions in mongodb_field_storage_query() (line 328 of /var/www/sites/all/modules/mongodb/mongodb_field_storage/mongodb_field_storage.module).
Notice: Undefined property: EntityFieldQuery::$propertyConditions in mongodb_field_storage_query() (line 373 of /var/www/sites/all/modules/mongodb/mongodb_field_storage/mongodb_field_storage.module).
Notice: Undefined variable: entity_type in mongodb_field_storage_query() (line 391 of /var/www/sites/all/modules/mongodb/mongodb_field_storage/mongodb_field_storage.module).

azovsky’s picture

Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new2.06 KB

I am trying to understand what is the reason here ...

Added a quick fix-patch. But! It is not a perfect solution, since it is not entirely clear intention of the author of mongodb_field_storage_query() function...

e.g. declaration of $entity_type in mongodb_field_storage_query() looks tricky :)

Tested on Drupal 7.35, MongoBD 7.x-1.x-dev (2015-Mar-07).

slashrsm’s picture

Do we know why those attributes are missing? Is $query completely uninitialized?

mac51’s picture

Subscribing to this issue.

slashrsm’s picture

@mac51: This kind of posts create a lot of noise in the issue queues. Use "Follow" button above to achieve the same result.

maartendbr’s picture

Undefined property: EntityFieldQuery::$propertyConditions in mongodb_field_storage_query()

when I dpm $query on line 328 and on line 374 it shows an EntityFieldQuery object but propertyConditions is an empty array

module version:

; Information added by Drupal.org packaging script on 2015-03-07
version = "7.x-1.0-rc2+28-dev"

francescjr’s picture

Had same issue, (a part of the warning of the issue, I had 2 more warning for "Undefined property EntityQueryfield::$propertyConditions in mongodb_field_storage_query() in line 334 and 392). (version rc2)

Applying the patch from azovsky solved all the warnings, but I also feel like him, I am not sure what is the purpose of the function "function mongodb_field_storage_query($query)" and if this quick fix is the real solution or not.

nehapandya55’s picture

I faced same issue, and after creating field i got warnings "Undefined property EntityQueryfield::$propertyConditions in mongodb_field_storage_query() on dev version.

Applying the above patch solved all the warnings.