Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
23 Apr 2006 at 04:56 UTC
Updated:
14 May 2006 at 08:01 UTC
Jump to comment: Most recent file
To fix this, I am passing $form along. I kept the possibility to call node_validate with a $form.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | node.preview_0.patch | 1.08 KB | tenrapid |
| #2 | node.preview.patch | 644 bytes | tenrapid |
| pass_form_into_validate.patch | 873 bytes | chx |
Comments
Comment #1
chx commentedAnd also, why I post with RTBC? Because the change is so minute. I will try to abstain from insant RTBC patches but this is really so.
Comment #2
tenrapid commentedAttached patch contains a small change so that altered values are already visible in node preview.
Comment #3
chx commentedMy patch was already committed just not set to fixed. Now, for tenrapid's patch, I honestly do not understand it. We do not change $edit in preview.
Comment #4
tenrapid commentednode_form_add_preview() calls drupal_validate_form(). But changes to the form values during form validation will not be visible in node previews as long as node_form_add_preview() gets only a copy of the global form values.
By receiving a reference to global form values it is ensured that node_preview() gets the possibly altered values.
Comment #5
chx commentedchanges to form_values are made to the global form_values. I do not understand you.
Comment #6
tenrapid commentedNew patch. This is less circumstantial.
Comment #7
chx commentedNow, this makes much more sense.
Comment #8
chx commentednode_form_add_preview is an after build callback. After build callbacks are called with
$form = $function($form, $form_values);so at first sight this patch makes no sense -- if form_values are passed already then why do we want to do a global for it? Because during validate it may change, that is. So please get this in before release.Comment #9
killes@www.drop.org commentedapplied to 4.7 branch
Comment #10
markus_petrux commentedNot sure how related to this, or how problematic...
Is it correct that node_search_validate() gets 3 arguments ($form_id, $form_values, $form)?
This callback is introducted like this:
Sorry, if this isn't a problem. Just looks that only 2 arguments are to passed to node_search_validate() from _form_validate().
Comment #11
chx commented1+2 is IMO three:
Comment #12
markus_petrux commentedOh, I see. The 3rd argument is not use very often in validate functions so...
Thanks
Comment #13
killes@www.drop.org commentedDrumm committed to HEAD.
Comment #14
(not verified) commented