• Notice: Undefined variable: collect in relation_entity_collector_views_post_execute() (regel 265 van sites/all/modules/contrib/relation/relation_entity_collector/relation_entity_collector.module).
  • Warning: Invalid argument supplied for foreach() in relation_entity_collector_views_post_execute() (regel 265 van sites/all/modules/contrib/relation/relation_entity_collector/relation_entity_collector.module).
  • Notice: Undefined variable: collect in relation_entity_collector_views_post_execute() (regel 265 van sites/all/modules/contrib/relation/relation_entity_collector/relation_entity_collector.module).
  • Warning: Invalid argument supplied for foreach() in relation_entity_collector_views_post_execute() (regel 265 van sites/all/modules/contrib/relation/relation_entity_collector/relation_entity_collector.module).

It seems to show up according to no real pattern that I can discern.

Comments

sebasvdkamp’s picture

StatusFileSize
new1.01 KB

Attached patch simply defines $collect = array(); before the foreach loop.

sebasvdkamp’s picture

Status: Active » Needs review
sebasvdkamp’s picture

Version: 7.x-1.0-beta3 » 7.x-1.x-dev

And my bad. I found this in the beta3 version. Reproduced it in the dev and fixed it in the dev. Code between beta3 and the dev is identical for affected parts.

KingSalibah’s picture

Sweet! Patch worked like a charm.

mikran’s picture

Status: Needs review » Needs work

The last submitted patch, Fixed_undefined_variable-1372718.patch, failed testing.

joachim’s picture

Status: Needs work » Needs review
StatusFileSize
new643 bytes

Here's a reroll.

This typically occurs if you're looking at a view of a custom entity, whose handlers don't add the entity ID field to the view fields. This can happen if you're using EntityAPI, which defines views data for a custom entity based on the schema table and hence uses generic Views field handler classes.

mikran’s picture

Status: Needs review » Fixed

committed

joachim’s picture

It occurs to me that it might be worth adding to the docs that views of custom entities won't show in the Collector unless you explicitly add their base field.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ChrisValentine’s picture

Status: Closed (fixed) » Needs work

Have applied this patch (manually) which has killed off most of the errors but I am left with:

Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /usr/share/drupal7/includes/entity.inc).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /usr/share/drupal7/includes/entity.inc).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 355 of /usr/share/drupal7/includes/entity.inc).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 355 of /usr/share/drupal7/includes/entity.inc).

  • Drupal core - 7.18
  • Chaos tools - 7.x-1.2
  • Entity Reference - 7.x-1.0
  • Entity API - 7.x-1.0-rc3
  • Views - 7.x-3.5
  • Relation - 7.x-1.0-rc3
mikran’s picture

Status: Needs work » Closed (fixed)

Your issue sounds a lot like #1634692: entity collector produces 'Warning: array_flip' on views where not all rows produce an entity.

If it isn't that please open a new issue