Closed (fixed)
Project:
Relation
Version:
7.x-1.x-dev
Component:
API
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Nov 2011 at 23:02 UTC
Updated:
22 Dec 2014 at 08:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
naught101 commentedHow are you trying to access the relation type information? What other modules do you have installed (Entity API?)
Comment #2
solotandem commentedFrom the script to insert relations, we are calling relation_save(). The save fails because relation_endpoints_field_validate() generates errors as the relation type information is not available when only in the cache.
Similarly, Features is unable to re-export the relation type when stored only in cache.
We are using entity-1.0-rc1 and relation (latest with a few patches as posted in issue queues).
Comment #3
naught101 commentedSorry, I'm not seeing that. Can you provide a detailed step-by-step on how to produce one or more of those errors?
Comment #4
solotandem commentedSteps:
- export relation types as a feature
- flush database and re-install site
- import/refresh the relation types feature (this leaves relation type definitions in cache only)
- run script to insert relations (this fails as indicated in #2)
- re-export the relation types feature (this fails as indicated in #2)
Comment #5
matglas86 commentedI have the same problem. The types are shown in the relation list but this loads it through relation_entity_info. When I call relation_list_types and they are only instanciated through the feature they don't show up. They are not in the table relation_type.
Comment #6
diwant commentedMe as well. I am able to relation_create and relation_save with the machine name of the phantom relation.
Comment #7
naught101 commentedwtf do we have both relation_list_types and relation_get_types?? matglas86, can you check whether relation_get_types() reports your feature-based relation type properly? it should, and then we can just make relation_list_types use that, or get rid of it al together..
Comment #8
naught101 commentedClosing after a year of no activity. Re-open if it's still a problem.
Comment #9
jelle_sI have the same problem, with the same steps to reproduce as in #4. As you say, relation_list_types does not load the ctools exportables. So please make relation_list_types use relation_get_types and mark it as deprecated, so other contrib modules get a chance to update before dropping the function all together.
Comment #10
naught101 commentedI don't have time to work on this at the moment. Feel free to post a patch, and I'll add it if it looks good.
Comment #11
jelle_sI looked again, and the function relation_get_types in fact is different from relation_list_types:
relation_get_types:
relation_list_types:
And relation_list_types is still different from relation_get_types_options because this function does not include the "(type)" after the label. The function relation_list_types is not used in the relation module itself, however, I've chosen to just fix the function in this patch, as it might be used in contrib (I know it's used in crm_core_relationship_ui from the crm_core module).
Comment #12
jelle_sIssue status
Comment #13
naught101 commentedCommitted to 7.x-1.x 807f7a1 (this function doesn't exist in d8). Thanks.
But I guess that doesn't resolve the original issue, so re-opening.
Comment #14
mikran commentedThis is really old issue. Many other issues have been since fixed that deal with relations exported to features so I'd imagine this is also resolved by now.