Closed (fixed)
Project:
Node Moderation
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 May 2006 at 18:59 UTC
Updated:
14 Jun 2006 at 21:00 UTC
Hi there,
I've found that before creating a query that includes node types, the current system nodes are retrieved with a use of node_get_types(). The returned value appears to be misused and the array elements are imploded for the use in the SQL statement. However, the Drupal API for hook_node_info() states that the 'name' is "human readable". This should not be used in SQL.
I believe what should be being imploded for the SQL statement is the key valuse returned from the node_get_types() which are defined by the 'base' setting in hook_node_info()
I have supplied a patch which at least fixes this error.
Regards
--AjK
| Comment | File | Size | Author |
|---|---|---|---|
| nmoderation.module.patch_1_27_01 | 1.07 KB | AjK |
Comments
Comment #1
AjK commentedPatch applied by Eaton to HEAD and DRUPAL-4-7
http://drupal.org/cvs?commit=32977
Assume issue remaining "patch (code needs review)" as eaton thinks this issue may be connected, in some way, with other issues still outstanding (see commit message)
Regards
--AjK
Comment #2
eaton commentedCorrect. Thanks for catching this one, AjK. I realized that I'd been testing with a pile of basic node types like 'page', 'story', 'image', etc that had identical code-level and human-readable names, ensuring that this problem never appeared. I'm going through other strange issues in the nmoderation queue now, to see if this bug was behind them.
Actually, it makes sense to close this one out and handle other issues in their respective threads. Anyhow, thanks!
Comment #3
calebgilbert commentedAm just wondering what setup you have. Am runnning 4.7.1 with today's cvs nmoderation, and cvs voting api. Still can't get it to promote. Willl try cvs nmoderation with 4.7 votingapi tomorrow. Along with a few other things.
Comment #4
calebgilbert commented...nmoderation and votingapi and it didn't work either...
However, I just figured out that Vote-Up Down totally rocks!
Just downloaded all the 4.7 version of everything and works great for promoting nodes. Though anyone wanting to set that up would do well to read this (from you, no less):
Comment #5
(not verified) commented