Closed (fixed)
Project:
User Relationships
Version:
6.x-1.0-beta9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
14 Dec 2008 at 02:23 UTC
Updated:
12 Mar 2009 at 23:20 UTC
I traced the problem down:
Line 64 of user_relationships_api.api.inc
$relationship_type = user_relationships_type_load($relationship_type->rtid);
returns NULL. A new record has just been added to the user_relationship_types table. When user_relationships_type_load tries to give back this record, it calls user_relationships_type_load() which uses a cached version that does not contain the new record.
I'm trying to write a plugin module for user_relationships, but this is blocking me. I have attached this plugin. The symptom is that the added options for user relationship types do not get saved on initial creation, but get saved on future edits.
| Comment | File | Size | Author |
|---|---|---|---|
| user_relationship_unique.zip | 2.5 KB | mtsanford |
Comments
Comment #1
mtsanford commentedComment #2
alex.k commentedThanks for noticing this - the error is in user_relationships_ui.admin_actions.inc:64 I believe. A second argument $reset has been added to user_relationships_type_load() similarly to user_relationships_types_load() to force reloading the cache. The hook should fire off with correct data now. The fix has been committed.
Your module looks like it's going to be useful to other people, looking forward to seeing more.