Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Nov 2006 at 00:04 UTC
Updated:
10 Dec 2006 at 02:45 UTC
Jump to comment: Most recent file
Attachment functionality of upload.module can be enabled on a per-nodetype basis (radio button on node_type_form). But actually the settings are not displayed correctly for books. The problem is in hook_form_alter() the following code gets the current state variable_get('upload_'. $form['identity']['type']['#default_value'], 1), but for books the node type is in $form['identity']['type']['#value'] (for other node types, e.g. page/story it in $form['identity']['type']['#default_value']). Not sure where the issue is located exactly, but I guess it is in book.module or node type system.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | fix_node_type_form_0.diff | 2.34 KB | pwolanin |
Comments
Comment #1
profix898 commentedMarking this 'duplicate'. It will be fixed by the patch in issue http://drupal.org/node/88633
Comment #2
pwolanin commentedfollowing on from http://drupal.org/node/88633#comment-159094
Attached patch should fix the problem in the $form building phase
Comment #3
pwolanin commentedtrying to clarify the title.
To reiterate: the bug can be observed when setting the comment or upload settings for any module-defined type. The correct settings are saved to the variables table. However, when editing the node type again the correct default values (the current settings) do not appear in the node type editing form.
Comment #4
chx commentedAs it happened with #node so it happens with #node_type . I like the solution (but I am biased because I suggested it...)
Comment #5
drummCommitted to HEAD.
Comment #6
(not verified) commented