Reviewed & tested by the community
Project:
Drupal for Facebook
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2011 at 19:38 UTC
Updated:
10 Mar 2014 at 09:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
amir_c commentedHere is the patch for this error. Tested myself and it seems fine i.e. the error "Defaults: Configure filter Broken/missing handler" is not shown anymore.
However, there are some other issues with fb_views module that I will report soon.
Comment #2
amir_c commentedafter applying the patch above, I tried again to use FB Friend filter and when choosing True on Views filter question "Is friend of the current user ", I get following pop-up error window "An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /smk/admin/structure/views/ajax/preview/fb_test
StatusText: Service unavailable (with message)
ResponseText: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fb_user.fbuINs' in 'where clause': SELECT COUNT(*) AS expression
FROM
(SELECT 1 AS expression
FROM
{node} node
LEFT JOIN {fb_user} fb_user ON node.uid = fb_user.uid
WHERE (( (fb_user.fbuINs = :db_condition_placeholder_0) ))) subquery; Array
(
[:db_condition_placeholder_0] => 0
)
in views_plugin_pager->execute_count_query() (line 141 of C:\xampplite\htdocs\smk\sites\all\modules\views\plugins\views_plugin_pager.inc)."
Anybody who knows what this could be? My guess is that line 24 in fb_views_handler_filter_friends.inc i.e. $this->query->add_where(0, $this->table_alias . '.fbu IN (%s)', implode(',', $friends)); is wrong
Comment #3
banana.boy commentedSame problem here after applying the patch:
Any news?
Comment #4
banana.boy commentedI fixed the query() method:
It works fine, but gives the same result for "true" and "false" parameters, which I don't know how to fix.
Comment #5
amir_c commentedI used views_handler_filter_in_operator as class extender in another views filter that I've been building on and it worked fine.
Comment #6
amir_c commentedbanana.boy, I tested your query() function and it works great!
I don't know why you're interested in results for "false" parameters but here is the code for that:
Comment #7
banana.boy commentedThanks !
I came back here to post the same thing as you !
But the hard thing is: how do you restrict the query to people who are NOT friends of the user?
Because, if you just use "NOT IN", it will only show Facebook users that are not friends, but won't show the users that are not on Facebook (not in the fb_user table) !
Comment #8
amir_c commentedPlease include this patch in next release of fb_views since it was tested OK. note that there are 2 patches here: one for the actual port to D7 and the one for the fb_views_handler_filter_friends.inc - see #4. thanks and keep up the good work!
Comment #9
luksakIf you want code to go into a module, you should create a patch. Inline code posted in comments will not.
Comment #10
luksakI created a patch for this. I only tested the profile picture feature and added all available options for the fbml tag (except facebook-logo):
https://developers.facebook.com/docs/reference/fbml/profile-pic/
Comment #11
joknjokn commentedLukas von Blarer's patch just worked for me, using 7.x-3.3-beta6. (I did it manually.)
Comment #12
tunicThe patch from #10 works fine.
Remember that if you are patching the module donwloaded form durpal.org the automatically metadata added by drupal.org avoids patching the .info file. The patch applies ok to the respository version.