Closed (fixed)
Project:
Facebook social plugins integration
Version:
7.x-2.0-alpha3
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2011 at 15:44 UTC
Updated:
6 Oct 2011 at 15:11 UTC
I can't make blocks appear in D7. Unlike #1265224, cache settings don't affect this issue.
Comments
Comment #1
tomceek commentedDisplays error
"Warning: array_filter() [function.array-filter]: The first argument should be an array in fb_social_get_presets() (line 359 of /var/www/da-home/public_html/modules/fb_social/fb_social.module)."
Comment #2
denes.szabo commentedProblem is with the preset handling:
fb_social_get_presets($name = NULL, $enabled = TRUE, $reset = FALSE) returns back with the $name named and enabled preset settings.
But this function mixes the return type. Sometimes it gives back array sometimes preset object. If you have a $name for the preset (when you insert a block) then the $presets = fb_social_preset_load($name, $reset); returns back with the array of the preset settings.
But this code gives back FALSE because there is no $name => preset_array() just $preset_array() actually:
If no $name given you gives back the preset or if you have a more presets then an array with preset objects.
The block uses fb_social_preset_view($preset) for displaying the block, but this function handling the $preset as object… Little bit confusing I think.
So, first we have to decide how we handling the $preset, should it's type be array or object. Then I can write a patch for this (I actually did for my site but not for the dev version of this module – quick fix was).
I think we should use the preset as object. Any idea?
Comment #3
tlangston commentedsubscribing
Comment #4
ferdi commentedThis is fixed in the last version
thanks!