Closed (fixed)
Project:
Subuser
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jul 2011 at 03:37 UTC
Updated:
29 Mar 2014 at 13:01 UTC
Jump to comment: Most recent
Hi
In the submit function you're calling relation_create('subuser', $endpoints); however this returns a relation - but does not save it (looking at 7.x-1.0-alpha3 of relation module).
We need to change it to call relation_save on the returned relationship in order for it to work.
Patch attached.
Lee
| Comment | File | Size | Author |
|---|---|---|---|
| subuser-relation-save.patch | 604 bytes | larowlan |
Comments
Comment #1
larowlanSee also #1208322: Issue with docblock for relation_create, a couple of typo fixes which is related
Comment #2
marcusx commentedPatch applied and creating subusers like a champ now!
Comment #3
djalloway commentedUsing the latest development version of the Relations module.
Should it be
relation_construct()instead ofrelation_create()?Comment #4
roderik#3: no, relation_construct() doesn't exist anymore.
(Google gives #1337740: relation_create should return relation object which also gives a hint as to why relation_save() might not need to be called at some time in the past, but it does now...)
so RTBC +1.
Comment #5
roderikAhem. Above code, works but the relation is still saved incorrectly... The relation_revision.rid DB field is always set to 0.
The cause is not here, but in the relation module. See #1396678: RID not saved in revision table when new relation is saved.
Until that patch is applied, #1213566: Add View/Edit/Delete Functionality (subuser.module) will not work.
Please note that until #1204692: Change default views to reflect upstream changes to VBO + relation (subuser.module) is updated, you should not use the latest -dev version from relation, since it will break the default view. Instead use relation-7.x-1.0-beta3 with the patch in #1396678: RID not saved in revision table when new relation is saved.
Comment #6
boombatower commentedCommitted thanks.