Multiselectbox imcompatible on buddypress 1.2.6.
-
Since buddypress upgraded to 1.2.6, clicking an avatar shows only “Array” for the “multiselectbox” where a user selected multiple items.
The plugin shows correctly when buddypress was the previous version.
Does anyone have the same trouble and/or have any solutions?
I am using WordPress 3.0.1.
-
This is also reported here, so definitely seems to be a problem in 1.2.6: http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/1-2-6-upgrade-xprofile_get_field_data-with-checkboxes-no-longer-working-correctly/
@boonebgorges, @djpaul – one to fix in the core a.s.a.p. I suspect
Thanks for your imformation, @rogercoathup
As this is a problem in BuddyPress 1.2.6, I should wait until the bug-fixed new version of Buddy Press is released, right?
unless you, or someone else comes up with a patch you can use
I have just tested a multiselect box in a profile field in 1.2.6 and it works as expected, in terms of display on both the ‘edit’ and ‘public profile’ pages. Unless I’ve missed something — possible — it’s an update that this plugin requires, not BP Core.
@djpaul – did you follow the link to the related thread? – they give a clear outline on how to recreate the problem (and in the Core not a plugin)
Hi @djpaul
I am not sure which is the cause of the problem, core or plugin, but when I see my profile, even items I selected at multiselect box are shown correctly.The problem exists only when I see profile through the plugin.
How about you? Do you also have the same problem when seeing profile through the plugin? It could be an answer which is the cause of the trouble.
@chestnut_jp – there is a new update in the thread http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/1-2-6-upgrade-xprofile_get_field_data-with-checkboxes-no-longer-working-correctly/ that may provide a solution for you (if it’s being caused by the same problem).
@boonebgorges has said he will investigate a core solution to xprofile_get_field_data problems since the upgrade to 1.2.6
Thanks again, @rogercoathup
Though I put the lines into bp-custom.php, the situation remains the same.
Perhaps, the provided solution might be for those who see “Array” on members’ profile pages. I have not found where “echo $profileTagClean;” is written, though…By the way, don’t you have this problem, @rogercoathup?
@chestnut_jp – no, we’ve decided to keep our existing installs on 1.2.5., so haven’t encountered the problems. We’ll use 1.2.6 for new sites.
I see.
Even if you have already decided to use 1.2.6 for your new site, you may wait until this proble is solved, @rogercoathup.I hope it will be soon to settle, and I feel somewhat sad because I do not have skills to correct this…
I can confirm that I too am having issued with the CD AVATAR bubble plugin and this… I’ve tried Boone’s filter fix, but that does not correct the issue with the plugin… I’ll keep digging.
@Slaffik please read.
Has anyone gotten the CD Avatar bubble plugin to work with 1.2.6? If so please post what you did…
Umm….
Not yet solved.Is there anyone who fixed this problem?
I hope the plugin author will see or, at least, read this thread…
I decided to change the “bp-xprofile-classes.php” file temporarily until the best solution is found.
After testing variously, I have found that the line 815, or so, is changed to the following and the multiselectbox data is shown properly:
`
[Original]
return maybe_unserialize( $data );
[Changed]
if ($field_id == “FIELD ID NUMBER”){
return $data;
} else {
return maybe_unserialize( $data );
}
`
“FIELD ID NUMBER” is the number of field_id, which you can get from “bp_xprofile_data” in database, or the nuber of id that is available from “wp_bp_xprofile_fields” in database.When wanting to specify multiple id numbers, use:
`if ($field_id == (No.1||No.2||No.3)){`
insted of
`if ($field_id == “FIELD ID NUMBER”){`However, as mentioned above, this is only a temporary solution. I really do not want to alter “bp-xprofile-classes.php” just for the single plugin, so I am still searching the solution…
Anyone else helps me?
P.S.:
I have found another problem. Please check The way of fixing ”Mention this user”,too. I have written a kind of solutions.Perhaps this could be the solution…
Because The problem happens as “bp-xprofile-classes.php” is changed from BP as I mentioned above, this is not the plugin’s bug but the “bp-xprofile-classes.php”.
Looking at the cd-avatar-bubble.php, multiselectbox and checkbox are processed by “bp_unserialize_profile_field”, resulting the data is already unserialized.
However, the line 815 in bp-xprofile-classes.php forces the data to be unserialized.Thus, the following could be the solution not only for this plugin but also others that are already unserialized:
At line 815 in bp-xprofile-classes, located in “/wp-content/plugins/buddypress/bp-xprofile/”,
`[ Original ]
return maybe_unserialize( $data );[ Changed ]
if ( is_serialized($value) ) {
return maybe_unserialize( $data );
} else {
return $data;
}`Any comments or opinions to this?
@slaFFik
I hope you will read the above solution, though it is not the plugin’s fault.We’re going to fix this selectbox serialisation thing in BP 1.2.7, which we’re a bit behind schedule with. Hopefully it’ll be released in the next couple of days.
Thank you for your information, @DJPaul
I am looking forward to seeing new BP1.2.7.
I’ve read this thread

Waiting for BP 1.2.7. I will also make some crash testing for this plugin today or tomorrow so perhaps a new version will appear by the end of this week (or sooner).
You must be logged in to reply to this topic.