Closed (fixed)
Project:
Drupal core
Version:
4.6.0
Component:
blogapi.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
19 Apr 2005 at 20:28 UTC
Updated:
8 Jun 2005 at 05:15 UTC
blogapi.module can create (or attempt to..) any node type in 4.6, but the code to create a new node still assumes the node will be of type 'blog'. In addition, it's still looking for individual variables rather than the arrays that are stored in 4.6.
It initializes those fields with calls like
variable_get('node_promote_blog', 1);
This will always return 1 unless you've upgraded to 4.6 from a previous version and set your blog nodes not to publish by default, and it will use that value for every type of node.
This patch retrieves the array (and "comment_$node->type") variable for the appropriate node type and assigns the values accordingly.
| Comment | File | Size | Author |
|---|---|---|---|
| BLOGAPI_4_6.txt | 1.17 KB | Prometheus6 |
Comments
Comment #1
walkah commentedACK! it's true... please apply to HEAD and DRUPAL-4-6.
+1
Comment #2
Steven commentedCommited to 4.6 / HEAD. Made the following code style changes:
'node_options_'.$edit['type']to'node_options_'. $edit['type']no space between . and ", always a space otherwise
$_node_type_defaultto$node_type_defaultno reason to prefix with an underscore
Comment #3
Steven commentedComment #4
Prometheus6 commentedI found an error in my patch. I don't supply a default value for variable_get() when I get the node options.
should be
Should I create a corrected patch for the same module as the first patch or against what is currently distributed? I'm just starting to get the hang of this CVS stuff...
Comment #5
Steven commentedThis was fixed in HEAD/4.6 a while ago.
Comment #6
(not verified) commented