Closed (fixed)
Project:
Entityreference backreference
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2012 at 13:35 UTC
Updated:
26 Mar 2012 at 11:46 UTC
This is great. The only issue I have found so far using backreferences with search api is that only one entity type backreference is made available per entity reference field, so eg. If I add an existing entity reference field (that was previously only used on nodes) to the users entity then I can only access user entities, and no longer nodes.
Thanks
Comments
Comment #1
rafaqz commentedOk found the problem :
changed
foreach ($field['bundles'] as $entity_type => $bundles) {
$info[$target]['properties'][$field_name .'_eb'] = array(
to
foreach ($field['bundles'] as $entity_type => $bundles) {
$info[$target]['properties'][$field_name . '_' . $entity_type .'_eb'] = array(
Works fine now, it was just writing each entity type to the same field.
Comment #2
jsacksick commentedFixed in the dev branch. Thanks, but i'm not sure this module is really used :)
Comment #3
rafaqz commentedYeah probably not! but it is very simple and acheives something that's often not possible to do as easily. And I'm using it at least so it was actually necessary to fix for my use case.
Its also quite useful with search api, a few of my searches are really much better than without it.
Comment #3.0
rafaqz commentedtypos