I've got a pageroute that goes through the user's nodeprofile pages to create them and a separate pageroute to edit them. The create pageroute works great. However, when I go through the edit pageroute, if I have a single on/off checkbox, the value never gets saved as 'off' in the database if I uncheck and save the pageroute. All the other cck types I've used work fine.

I originally started a thread in the forums for this, but I never got anywhere with it- http://drupal.org/node/178617. I then realized this had to do with the lonely node management in pageroutes.

I've got the following modules installed:

nodeprofile 5.x-1.2
nodefamily 5.x-1.3
pageroute 5.x-1.0
subformelement 5.x-1.3
usernode 5.x-1.3

Comments

fago’s picture

Project: Node Profile » Pageroute
Version: 5.x-1.2 » 5.x-1.x-dev
Status: Active » Fixed

I've just tested it with the latest pageroute (dev snapshot) and it's working fine. If I should fix this, I must be able to reproduce this. So make sure to determine what changes cause this behavior. Also make sure that it is working when you edit the node with node/XX/edit.

So please update to pageroute dev snapshot, if the problem persists, reopen.

smooshy’s picture

Status: Fixed » Active

I upgraded to the dev version of pageroute and I'm still getting this error.

When I edit the nodeprofile node with /node/XXX/edit, the value gets updated properly.

What do you need from me to be able to debug this better?

tassoman’s picture

Try to deactivate "Don't show drupal messages" ... I'm getting same issue and I dunno why.

tassoman’s picture

I have solved my issue... my radio/checkbox buttons were CCK created as integers and storing strings.
Now I've set the correct value type and it's working.

reed.richards’s picture

I have the same stuff installed though the pageroute dev. and it ain't working. I can confirm the above that using the ordinary node edit url sets the values correctly.

I am guessing it's connected with some subform setting. See for example http://drupal.org/node/250431

I will try to solve this issue.

Yeah and where have you disappeared when we need you fago?

reed.richards’s picture

Priority: Normal » Critical

Changing this to kind of critical

reed.richards’s picture

I can also confirm that multiple checkboxes fails gracefully even letting users not be redirected unless all of them are checked. As usual an ordinary node edit functions as expected i.e. lets you check and uncheck.

If someone would be interested to fix this stuff I would be willing to discuss some sort of reward. I've already wasted enough time trying to locate the error, and the deadline on my project wouldn't let me pour through all the code that have to function in order to get this right.

reed.richards’s picture

Confirming that something happens when the nodeprofile stuff is turned on. If you just use pageroute with the lonely node management everything is working al right, however when checking the option for using the node as a node profile stuff changes from working to non-working with checkboxes.

Checking the dev modules output on the submit the fields are just set to the current values in the update queries.

fago’s picture

/me appears.. ;)

Are you sure the behaviour changes when you change nothing but make it a nodeprofile? That sound's strange, as nodeprofile does nothing expect setting the content type to max population = 1 and creating a nodefamily relation to the usernode, if the module is installed.

Please make sure you are using the latest development versions of
* CCK
* nodeprofile
* subform element
* nodefamily

If so, I'll try to reproduce it and squash the bug.

reed.richards’s picture

Thanks for appearing :) It saved my day, I've been having headaches about this thing. But the subform_element module fix you submitted did the thing actually. I agree that it sounds strange that toggling nodeprofile on made this problem appear, maybe some dark voodoo was at hand. But now it's solved and now one's happier than me. Thank you so much for solving this!

fago’s picture

Status: Active » Fixed

great!

so the fix for this is: update the subform element module to the latest dev snapshot or a future 1.4 release, which will be released in the next days.

smooshy’s picture

Works great!
I downloaded the latest subform dev version and that fixed it.
Thanks for your help!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

richardtmorgan’s picture

The issue is of CCK saving the integer as a string - the problem comes if you try:
0 | Don't do this
1 | Do this

The space between the integer and the | is saved too - making it a string.

You need:

0|Don't do this
1|Do this

Of course the help text for the field includes the space...