Closed (fixed)
Project:
Relation
Version:
7.x-1.x-dev
Component:
API
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Aug 2011 at 13:23 UTC
Updated:
4 May 2012 at 14:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
naught101 commentedSorry, I'm not really in a position to say yes or no, as I don't know what it does... can you give an example of what you can do with it?
Comment #2
jsacksick commentedThis module loop over all entity types concerned by a relation and add a property list wrapper containing a list of related entities.
For instance, Search API (and a lot of other modules) fetches all its data from the Entity Metadata information.
So once this module is enabled, you can create with this, facets obtained by the relation.
Comment #3
chx commentedI am willing to commit this if you convert the relation_rules_load_related rules action callback to use it.
Comment #4
jsacksick commentedWhat do you mean ? Can you explain me a little please ?
Comment #5
chx commentedWell, your module creates a list of related entities and that's exactly what relation_rules_load_related exposes to rules so the two quite overlap.
Comment #6
jsacksick commentedThis patch should be ok.
I only have a doubt remaining, Do we have to return wrapped endpoints in
relation_rules_load_relatedor is it ok like that ?Comment #7
jsacksick commentedComment #8
jsacksick commentedHere is a second patch with wrapped enpoints returned instead.
Comment #9
chx commentedComment #10
chx commentedA test has been committed to the repo which runs a rule on node creation, creating a relation between a previously specified node and the new node. Then it proceeeds to load the related entities of the new node. If all goes well this will be the previously specified node. Then it deletes the entity The test asserts the other nodes created by the test setup are unharmed and the one we wanted is gone. This almost passes the current HEAD but not with the patch provided here. Almost, because there is a rules warning about a cache problem. Interestingly, if I apply the patch from here, I get two of this error message.
Comment #11
jsacksick commentedExcept for the
_rules_rebuild_cache()issue, the other errors are now gone with this patch.Comment #12
chx commentedThanks! Committed.
Comment #14
acrazyanimal commentedSee #1361796: rules: load related entities, entity fields unavailable for a patch to "Loads related entities".