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.
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.
This problem is plaguing my forum. :-[
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?
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.
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?
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.
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.
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?
Admin - Configuration - Server settings - Chache
And don't forget to empty the cache after disabling it.
Admin - Maintenance - Forum maintenance - Default, the last option.
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.
This is still a very annoying problem.
I have tried all suggestions and still nothing...
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.
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}.
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?
I take it there is no solution?
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.
The blank means no selection.
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?
This problem is plaguing my forum still.... any other advice?
Nothing?
I hate bumping, but this is perhaps the most annoying issue for my forum.
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?
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.
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.
Glad to hear that you got that bug in that mod fixed!
Thanks for marking this solved.
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.