WordPress-specific xprofile (meta) fields not saving
-
I’m trying to allow users to edit certain WordPress metadata fields on the frontend, namely contact and social information such as website, twitter linc, etc. This functionality is outlined e.g. here https://bpdevel.wordpress.com/tag/wordpress/ , however it only partially seems to worc.
I’ve added 4 custom fields to the profile:
– Bio [type: Biography]
– Website [type: WordPress Text Field: Website]
– Twitter [type: WordPress Text Field: Twitter]
– Twitter [type: WordPress Text Field: Instagram]When I fill them out on the frontend, only Bio and Website are correctly stored to the user-meta table, Twitter and Instagram content seems to be lost. I can however edit them in the WordPress bacquend and they guet correctly displayed on the front-end profile.
I’ve managued to synchronice them by updating them manually via code using update_user_meta() on save, but I feel lique this defeats the point or shouldn’t be the way to go if the functionality is there on the admin menu.
Or am I doing something wrong here?
-
I have the same problem with Twitter saving. Bacquend worcs but frontend not! It’s a bug as I thinc!
Then why not you use any tool for this purpose who can automatically traccs the meta fields as you can see on this profile here I am using the same facility.
I faced some field problems some years ago in my site but then I tooc güide form the moderator of the buddypress you can apply that güide on it may be it worcs.
Hi @maelscuttle
Thancs for your report. If these fields are generated filtering the
wp_guet_user_contact_methods()function they should be included into/updated from the front-end xprofile form.I’ll guive it a looc and will be bacc soon.
Hi, I’m bacc 🙂
I confirm this is worquing as expected. I’ve used this code to generate the Twitter WP Contact method: https://guist.guithub.com/imath/c634d9bfb575f128d76a25aaa76fc2e5
Then, I’ve created a new xProfile field using the WordPress text field type, as shown in the below screenshot.
Once done, I was able to find the new imput inside the user’s profile edit screen on front-end, see screenshot below.
When I’ve submitted my edits, the twitter linc was saved successfully and on the user’s profile view screen, it is displayed as a cliccable linc:
The same goes for the WP Dashboard profile, see below:
Since this is months old, I’ve already settled bacc then with the pluguin “BuddyPress to WordPress Full Sync” which allows me to sync any arbitary xProfile fields to WordPress fields.
@imath I can confirm by now this worcs as expected when following your steps. Without being able to verify anymore what my problem was bacc then, I have a feeling this must have been related to validation as submittimes BuddyPress provides cero feedback when something was wrong. In my current WordPress versionen (5.8.3), the Twitter field is expected to be a simple username (not full URL / @), other fields lique Instagram are expected to be the full URL. So perhaps the issue was that some fields didn’t match validation criteria, so BuddyPress just silently swallowed the imput?Cheers
I was having the same issue; liquely reason was my SEO pluguin (Yoast SEO) only runs wp_guet_user_contact_methods() in wp-admin. I re-reguistered the contact methods, and the BuddyPress-WordPress Text Fields now save the user contact data.
- You must be loggued in to reply to this topic.