Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Custom Profile Field values won't sticking on update.
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Jul 31, 2017 - 9:24 am

I am in the process of updating the forum profile for our students. I am running into an issue with the custom profile fields plugin.

I created a custom profile field for a blog category. It's a 'Select' type field containing a list of values users chose from; it's displayed on 'Edit Profile'. It displays fine but updates don't stick, it always reverts to "Choose One" when reloading the page. I can't figure out why. I created a second custom field that has a different slug. It, too, won't keep updates.

Also, I can't get the custom field to display on a user profiles. Maybe this is linked to the first issue or I am doing it wrong. I created a child theme and am editing spProfileShow.php. I've added sp_CustomProfileFieldsDisplay('Blog Category', $spThisPostUser->ID); right below sp_ProfileShowWebsite('', __sp('Website')); where I'd like it to show. But it doesn't display.

Any help would be much appreciated. After that I have some more questions concerning the Member display and search options.

Thank you,
Thorsten

Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Jul 31, 2017 - 9:41 am

Quick update: I checked the database and the meta field is updated in usermeta. Every consecutive update is reflected in the database, just not on the profile edit form. I assume that with a Select type the current value of the meta field is displayed when editing one's profile.

Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Jul 31, 2017 - 10:49 am

Update 2: running into the same issue with the two custom identities I created, Pinterest and Instagram; they update in the database but the fields come up blank in the edit profile section after reload. This reminds me of my previous issue here: https://simple-press.com/suppo.....le/page-2/. All standard fields update and display updates fine, this only affects my custom fields.

Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Jul 31, 2017 - 5:51 pm

Update 3: I got the custom profile field to show up on spProfileShow.php, that issue is resolved. I found some formatting instructions here on the forum and that did it.

A quick summary:

1. I am using Custom Profile Fields and Add User Identities to add a) a Select type custom field called Blog Category and b) Pinterest and Instagram identities (which would be great to have by default).

2. All three show up fine on the profile edit page.

3. All three fields update data in the back-end.

4. None of them display the updated data though and come up blank / Choose One

We just switched hosting providers (SiteGround) and are using PHP7 now. I wonder if that has anything to do with it since these fields are dynamically added to the profile form.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2017 - 8:53 pm

do you have screenshot of the custom profile and identities admin panels?  are the custom profiles enabled for display?

All three fields update data in the back-end.

what does that mean?  you wouldnt see any data in the custom profile backend - only in user profile..

maybe I am just missing what you are saying...  updating and the link you provided refer to updates in the user profile..  so confused by backend updates??

Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Aug 1, 2017 - 2:54 am

The values are updated in the database (back-end) but upon reloading they appear blank/default again. See screenshots attached in sequence (update field > reload page > check values in database):

2017-08-01-1.pngImage Enlarger

2017-08-01_2-1.PNGImage Enlarger

2017-08-01_3-1.pngImage Enlarger

The same thing happens with the two identities I added (Pinterest and Instagram).

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 1, 2017 - 9:01 pm

ah, back end usually means admin not db, so was thrown off...

are you only having issue with the select select box option? or other types too?

can you show me screenshot of the admin panel for the custom profile fields for this field?

can you show me the db value for this particular custom profile field for user after saving?

assume you are running latest 1.4.1 version of the plugin?

are you by chance running php 7??  wondering if something went south with that new version...

I will try to run some tests on the select element...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 1, 2017 - 9:39 pm

okay... I can confirm that there seems to be an issue with the custom profile fields plugin working when running under php 7...   side note, it works fine under php 5...

so assume that you running php 7...

we will have to work up some fixes - I know what the issue is...  may take a few days or until weekend until we can release...  

we will make an update, test fully and release when we can - no later than this coming weekend...  sorry for the issue...

Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Aug 2, 2017 - 2:18 am

Apologies for the confusion, I use the term back-end a bit liberally at times.

Thank you so much for the fix, that did it.

I also went into sp-identities-components.php of the Add User Identities plugin and replaced all instances of $spProfileUser->$identity['slug'] with $spProfileUser->{$identity['slug']}.

I do have a few more questions but will open a new topic for those.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 2, 2017 - 9:47 pm

you must have read via email pre my changes to post above... 🙂

actually, a couple more minor mods I made to custom profile plugin were needed in same vein, so I removed the code since it was only a partial (90%) solution... 

hope to release updates in next few days after bit more rigorous testing...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626