Closed (fixed)
Project:
Project
Version:
x.y.z
Component:
Issues
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Feb 2006 at 19:18 UTC
Updated:
17 Mar 2006 at 11:16 UTC
When submitting a comment on a project issue, user is bumped back to project form. Any 'description' entered is lost. No error message is given. Identical result on preview.
Comments
Comment #1
nedjoI've tracked this issue down to the use of object casting. We replaced
$edit = (array2object($_POST['edit']));with$edit = (object) $_POST['edit'];inproject_comment_page()--but the result isn't equivalent. When I return it toarray2object()What do we do elsewhere to read in a node object from a form post operation?
Comment #2
dries commentedI don't see any difference:
Original array taken from issue follow-up submit:
Casted with (object):
Casted with array2object():
Looks identical to me...
Comment #3
dries commentedOn line 19, we call project_comment_form:
$output .= project_comment_form($edit, $param);However, $param isn't initialized ... maybe that is the problem?
Comment #4
hunmonk commentedi installed project module on a fresh copy of HEAD, and i'm not getting this problem. not sure how else i can be of help :)
Comment #5
dries commentedOdd. It's easy to reproduce on scratch.drupal.org.
Comment #6
nedjoWith fresh HEAD versions of Drupal and project module installed from scratch today I still get the problem--submitting a comment on a project issue returns to the comment form and no comment is saved.
Yes, I was wrong about the object casting, no issue there.
Further testing shows that the project_comment_page function is being called twice; the first time it has access to POST data, but the second it doesn't. This looks very similar to the issue causing bug http://drupal.org/node/50337.
Comment #7
dries commentedFixed it in CVS HEAD.
Comment #8
(not verified) commented