I'm using nodeprofile for my users' profiles. I have created a checkbox on the nodeprofile page that determines whether a user is subscribed to a mailing list.
- I've created a Single on/off checkbox with a type of text.
- Selected Multiple Values
- In Allowed Values, I entered the
0|Noand1|Yes(on separate lines)
The checkbox shows up on my node profile form correctly. If I don't check it, the value remains 0. Then, if I check it, the value in the DB becomes 1. If I go in and try to uncheck at this point, it never updates back to 0 to turn off the checkbox. So in essence, users will never be able to unsubscribe.
I did a test and edited the nodeprofile page with the admin user (1) and it updates the field correctly. I checked the access control settings for the nodeprofile content and "create" and "edit own" are selected for authenticated user and when I test other fields on the same nodeprofile page, the values get updated in the DB.
I've been searching for similar issues for days now and need some help before I shoot myself. Anyone notice if I'm doing anything obviously wrong?
Comments
Hmmm...
I don't fully understand your problem, but these are some places at which I can think of to start.
1) Why have you selected "multiple values"? Do you want to have more than one checkbox, or was this a mistake?
2) Have you tried debugging by looking at the source code in yourmodulesdirectory/cck/optionwidgets.module, line 108?
3) When you uncheck it, does it still appear unchecked when you go back to the node profile form?
-cwgordon7
tried everything
I've tried every combination of settings for that field. I've had "required" checked and unchecked, "multiple values" checked and unchecked. Nothing seems to make a difference.
I'll take a look...
When I go back to the edit form, the checkbox is still checked. Meaning, the checkbox is consistent with the database and that means it never changes the value to 0.
even tried patch
I just tried the patch at http://drupal.org/node/149103 and it didn't fix the problem, but thanks for the tip to check out that line number. It should help me diagnose the problem.
-stan
Found something
http://drupal.org/node/140687 provides a patch as well... maybe try that one?
-cwgordon7
nothing is working
Nothing seems to be working. I'm going to get the original version from the package and try applying patches to a fresh file.
update
I've also got usernode and pageroutes installed. It seems to only fail when I'm trying to edit the nodeprofile while in the pageroute (lonely node managment). If I go to
nodeprofile/CONTENT_TYPEthe value updates correctly.created issue
I created in issue against node profile for this. http://drupal.org/node/182065
hopefully i can get some answers.