Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: colby2152 on May 10, 2011, 04:32:54 PM

Title: Profile fields defaulting
Post by: colby2152 on May 10, 2011, 04:32:54 PM
I have drop down profile fields with a default option.  The problem with this is that when a user edits their profile consecutive times then it reverts to the default setting.  I would like this not to happen.  The default should only be used when the user has never modified such field.
Title: Re: Profile fields defaulting
Post by: colby2152 on May 13, 2011, 12:06:34 PM
I know bumping threads is shunned here, but this has not received a response in three days.  To clarify the first post, I have several profile fields with drop-down choices.  Each drop-down choices has a default (blank).  The default is actually just a wrapper of italics code because I don't want a space, and I need the default to show as nothing.  This profile field shows up in the topic view, PM and profile page.  For some reason, the following happens AFTER a user edits their profile and saves their profile... say they decide to edit it again and save it (generally happens when people are toying around with their signature)... after the first save, all of the profile fields with drop-down choices revert to the default.  It only becomes an issue when the user saves the profile edits once again.
Title: Re: Profile fields defaulting
Post by: colby2152 on May 14, 2011, 11:32:55 PM
This problem is plaguing my forum. :-[
Title: Re: Profile fields defaulting
Post by: Kays on May 14, 2011, 11:47:52 PM
Hi, have you got a screenshot of how you've got those fields setup. Or a test account maybe?

Any errors in the error log?
Title: Re: Profile fields defaulting
Post by: Sir Osis of Liver on May 14, 2011, 11:48:06 PM

Just a guess, but sounds like the database values for the dropdown options are not being requested when the form reloads, so those items revert to default (blank), and that's what's saved to the db on the second edit.

Title: Re: Profile fields defaulting
Post by: colby2152 on May 21, 2011, 06:36:28 AM
Quote from: Krash. on May 14, 2011, 11:48:06 PM

Just a guess, but sounds like the database values for the dropdown options are not being requested when the form reloads, so those items revert to default (blank), and that's what's saved to the db on the second edit.

Krash, that sounds logical.  How do I force an entire profile save and load?
Title: Re: Profile fields defaulting
Post by: Sir Osis of Liver on May 21, 2011, 11:04:53 PM

Are you using a mod, or did you code it yourself?  It appears that the form saves the new values to db correctly, but when it reloads it does not retrieve the saved values for the dropdown options.  It's half right.  Don't know enough about MySQL functions to help much, but if you attach the code, maybe someone else can jump in and find the problem.

Title: Re: Profile fields defaulting
Post by: CapadY on May 22, 2011, 03:52:19 AM
What happens when you disable the use of SMF-cache ?

I've had something like this before and it was solved after disabling the cache.
Title: Re: Profile fields defaulting
Post by: colby2152 on May 22, 2011, 12:10:36 PM
Quote from: CapadY on May 22, 2011, 03:52:19 AM
What happens when you disable the use of SMF-cache ?

I've had something like this before and it was solved after disabling the cache.

How do I disable the cache?
Title: Re: Profile fields defaulting
Post by: CapadY on May 22, 2011, 02:02:24 PM
Admin - Configuration - Server settings - Chache

And don't forget to empty the cache after disabling it.

Admin - Maintenance - Forum maintenance - Default, the last option.
Title: Re: Profile fields defaulting
Post by: colby2152 on May 29, 2011, 08:22:27 AM
Quote from: CapadY on May 22, 2011, 02:02:24 PM
Admin - Configuration - Server settings - Chache

And don't forget to empty the cache after disabling it.

Admin - Maintenance - Forum maintenance - Default, the last option.

Thanks, but apparently the cache was already disabled.  Could this mean there is another issue?  I just emptied the cache, but I am not sure if the problem has been resolved.
Title: Re: Profile fields defaulting
Post by: colby2152 on June 08, 2011, 12:48:17 AM
This is still a very annoying problem.
Title: Re: Profile fields defaulting
Post by: colby2152 on June 13, 2011, 09:28:42 PM
I have tried all suggestions and still nothing...
Title: Re: Profile fields defaulting
Post by: Xarcell on June 13, 2011, 09:36:49 PM
I have seen this problem before.

If you create a blank field as a default selection, and then edit your profile and change only one of those fields, all others will revert to default.

2 ways to avoid this. 1.) Don't use a blank field. 2.) tell your user's that when they change a profile field, they must change(re-select) all of them.

On my forum I use things like "other" as a default field. Rather than leave it blank.
Title: Re: Profile fields defaulting
Post by: colby2152 on June 14, 2011, 08:05:29 PM
Quote from: Xarcell on June 13, 2011, 09:36:49 PM
I have seen this problem before.

If you create a blank field as a default selection, and then edit your profile and change only one of those fields, all others will revert to default.

2 ways to avoid this. 1.) Don't use a blank field. 2.) tell your user's that when they change a profile field, they must change(re-select) all of them.

On my forum I use things like "other" as a default field. Rather than leave it blank.

Actually, my default selection is a "blank" in the form of two italic BBC codes {i}{/i}.
Title: Re: Profile fields defaulting
Post by: colby2152 on June 15, 2011, 10:15:40 AM
I notice that when I edit my profile, there is a blank space at the top of the drop-down.  This isn't part of my selection choices for the profile field.  Somehow, this rogue blank is appearing and causing the issues?
Title: Re: Profile fields defaulting
Post by: colby2152 on June 23, 2011, 08:46:04 AM
I take it there is no solution?
Title: Re: Profile fields defaulting
Post by: colby2152 on July 09, 2011, 04:50:19 PM
I edited a profile to pick a selection in the drop-down.  It registers to the database so that the profile is updated, but the following screen (see attached GIF) shows that it is reset.  Notice the empty option in the drop-down.  I don't even have this as an option in my custom profile field selection.

Title: Re: Profile fields defaulting
Post by: live627 on July 09, 2011, 05:17:07 PM
The blank means no selection.
Title: Re: Profile fields defaulting
Post by: colby2152 on July 10, 2011, 08:44:32 PM
Quote from: live627 on July 09, 2011, 05:17:07 PM
The blank means no selection.

Yeah... I know... But why are the fields defaulting to that after a value is selected?
Title: Re: Profile fields defaulting
Post by: colby2152 on July 28, 2011, 10:27:43 PM
This problem is plaguing my forum still.... any other advice?
Title: Re: Profile fields defaulting
Post by: colby2152 on August 02, 2011, 10:06:07 PM
Nothing?
Title: Re: Profile fields defaulting
Post by: colby2152 on August 19, 2011, 05:26:23 PM
I hate bumping, but this is perhaps the most annoying issue for my forum.
Title: Re: Profile fields defaulting
Post by: Angelina Belle on September 15, 2011, 11:45:35 AM
If what you say here and here (http://www.simplemachines.org/community/index.php?topic=447877.msg3142938#msg3142938) is correct, then something is wrong.

Can you clarify:
1) admin alters another user's profile fields
2) admin does a couple of these
3) admin's own custom profile fields are somehow altered in the process

Is that correct?

Here are a couple of questions, meant to narrow things down (pinpoint or rule out any problems caused by install or mods)
1) How did you "get to" SMF 2.0 -- fresh install, upgrade from an SMF 2 RC version? upgrade from SMF 1.1.x?
2) What mods have you installed?
Title: Re: Profile fields defaulting
Post by: colby2152 on September 15, 2011, 12:46:10 PM
FYI, I am marking this topic solved.  I think it was an issue that occured for a few months between two versions of a special mod that I had requested (it dealt with profile fields, not these ones in particular though).  Thanks.
Title: Re: Profile fields defaulting
Post by: live627 on September 15, 2011, 12:51:44 PM
Quote from: colby2152 on September 15, 2011, 12:46:10 PM
I think it was an issue that occured for a few months between two versions of a special mod that I had requested (it dealt with profile fields, not these ones in particular though). 
That could be the reason. All profile fields actually use a centralized rendering function.
Title: Re: Profile fields defaulting
Post by: Angelina Belle on September 15, 2011, 12:52:33 PM
Glad to hear that you got that bug in that mod fixed!
Thanks for marking this solved.
Title: Re: Profile fields defaulting
Post by: colby2152 on September 15, 2011, 01:38:37 PM
Quote from: AngelinaBelle on September 15, 2011, 12:52:33 PM
Glad to hear that you got that bug in that mod fixed!
Thanks for marking this solved.

No problem.