some decision settings are not saved properly
pierre75 - July 27, 2009 - 15:23
| Project: | Decisions |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Problems
1. Validating a form, two Decisions setting fields are not inserted / updated:
- Months of Opening and Closing dates
- Quorum percentage and number
2. There are differences between the loaded object (hook_load) and the hook_update process : all Decisions settings values are lost if a Decisions node type is loaded and saved.
Patch
The attached patch tries to fix these two bugs :
1. Modify update and insert queries ; modify dates month format
2. Load correct data in hook_load in order to keep them updated with hook_update
| Attachment | Size |
|---|---|
| decisions_node_load_and_form.patch | 5.39 KB |

#1
Setting proper status.
#2
So I acknowledge this issue, but it seems that the associated patch (1) doesn't apply to the current CVS HEAD and (2) doesn't resolve the issue at all. I'll look into this further.
#3
So the issue was just a problem with cached pages and the fact that a lot of hooks were in other files. I have merged all files together for now (which is a really ugly and crude hack) but it seems to resolve the issues noted here.
#4
Thank you for your response and your work !
I am sorry, I'm afraid I have actually patched against 6.x-0.1-beta3 and not CVS HEAD... But I don't understand why it doesn't resolve the problems described :) (except a hours rendering on form, apparently only fixed for a special hours format drupal setting)
However, it seems to remain a bug with setting fields saving :
- Quorum data are not saved (is it correct ?)
- Date fields : hours and minutes are not correctly rendered on form
It also looks like it is not possible to load and update a decision node outside the form submission process. That is the case, for example, with Workflow module : by changing a decision node workflow status, we lose all settings data.
(I don't change the issue status because I perhaps made errors :) )
#5
I'm not sure I understand: are you sure the bug remains? I can save quorum fine here...
The issue of editing decisions nodes programmatically is a separate one, see #514562: Allow creating decisions programatically.
#6
Hi,
if I am not wrong, I am afraid not :
1. I can't update quorum fields (the query uses $node->settings['quorum_abs'] but the posted value is $node->settings['quorum']['quorum_abs'] ; idem for quorum_percent ; I don't understand how it could be updated ?) ; for date updates, it seems to depend on drupal time settings.
2 Concerning #514562 : it appears to me that this patch does not fix the problem with all settings fields (for example, showvotes or quorum ?) and only for update (not insert) ; am I wrong ? Thus, I tried to use it with workflow module : if I update the node status I lose settings fields ; it is a bit like we cannot do a node_save(node_load($nid)) without lose these values.
#7
Indeed you are right, I still can't set the quorum here.
Concerning #514562: Allow creating decisions programatically: it's a different issue, it's irrelevant whether the patch is right or not here... If it's not right, fix it and upload another one, in the other issue. :)
#8
Okay, the only issue I could reproduce was the quorum issue. the dates are set and persist properly when saved.
I committed a fix to CVS and will roll out a release soonish.
#9
Ok, dates are not properly saved if the Drupal default Time zone is not set. Once it is done, all is right.
I will open a new issue for the load and save node question.
Thank you.
#10
Automatically closed -- issue fixed for 2 weeks with no activity.