Closed (fixed)
Project:
User Relationships
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Mar 2011 at 01:03 UTC
Updated:
18 Apr 2011 at 07:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
berdirNice catch, please try the attached patch.
Comment #2
craigritchie commentedThanks. The error doesn't appear, but a) the autofill doesn't work until I complete the entire name of the relationship type, and b) when I click 'update,' it just throws this error: "Unable to find relationship type: follow" ('Follow' is the name of my relationship) I also tried changing the 'F' in follow to lowercase, but it still didn't work. So, the autofill kind of finds it, but it's still buggy.
Comment #3
craigritchie commentedJust checked my server logs and it shows this: "call to undefined function drupal_json() in ...sites/all/modules/user_relationships/user_relationship_views/user_relationship_views.module on line 60"
Comment #4
BenK commentedSubscribing
Comment #5
berdirCan you describe what you are exactly doing so that we can reproduce the error?
Comment #6
craigritchie commentedSure... Let me know if this is enough info:
1. I have a one-way relationship I've called "follow" (reciprocal, but not sure what that means at this point, doesn't require approval, never expires)
2. Much like Twitter, for example, I want users to be able to see the content that is generated by people they follow. I need a view that lists, at the very least, the title of content that users they follow have created.
3. When I create/edit the view, I add a filter of "Relationship Type;" "is one of" and type "follow"
4. Autofill now finds the relationship type "follow" but when I choose it and click "Update" (filter) an error says: "Unable to find relationship type: follow"
Comment #7
berdirOk, there is a serious mess in UR-Views :)
Try this patch, autocomplete and selecting types should now work, there might be other issues but I suggest you mark this as RTBC (if it works) and open new issues for the other things.
Comment #8
BenK commentedI was able to reproduce the error and tested the patch in #7. Yes, the autocomplete and the selecting of types now works.
But I didn't mark this RTBC because there's one other error I noticed: If you go back to edit the filter (by clicking on "User relationships: Relationship type = follow" in the Views UI), then you get the following error message in a popup:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/views/ajax/config-item/testur/default/filter/rtype
StatusText: Service unavailable (with message)
ResponseText: Recoverable fatal error: Object of class stdClass could not be converted to string in views_handler_filter_user_relationships_type->value_form() (line 19 of /Users/benkaplan/git/drupal-7.0/sites/all/modules/user_relationships/user_relationship_views/views_handler_filter_user_relationships_type.inc).
As a result, you can't edit the filter.
--Ben
P.S. As a side note, I'm not sure about the results actually returned by this view. Perhaps what is needed for the intended use case is a Views relationship. Nevertheless, it's a good catch of errors.
Comment #9
berdirOk, should work now.
Comment #10
BenK commentedTested the latest patch and confirmed that all errors are gone and everything seems fixed. This is RTBC.
--Ben
Comment #11
berdirCommited.