PacketFence - BTS - PacketFence
View Issue Details
0001056PacketFenceweb adminpublic2010-09-01 11:282011-01-26 15:38
rafamiga 
obilodeau 
normalminoralways
closedfixed 
1.9.0 
1.9.11.9.1 
12f1379f5711d11d5ef5455850253bc0569e5593
0001056: viewing nodes per node category with a node category with spaces in it's name fails
Category name is not put in parenthesis, thus editing it using web interface fails miserably (adding works OK).

Sample:

 Error: Problems executing 'PFCMD node view category=VLAN5 - swetry order by mac asc limit 0,25'

Command not understood. (pfcmd grammar test failed at line 214.)

Error: Problems executing 'PFCMD node count category=VLAN5 - swetry'

Command not understood. (pfcmd grammar test failed at line 214.)
No tags attached.
Issue History
2010-09-01 11:28rafamigaNew Issue
2010-09-08 13:57obilodeauTarget Version => 1.9.1
2010-09-17 13:33obilodeauStatusnew => assigned
2010-09-17 13:33obilodeauAssigned To => obilodeau
2010-09-17 13:38obilodeauNote Added: 0001677
2010-09-17 13:38obilodeauSummaryediting a node category with spaces in it's name fails => viewing nodes in a node category with spaces in it's name fails
2010-09-17 13:45obilodeauSummaryviewing nodes in a node category with spaces in it's name fails => viewing nodes per node category with a node category with spaces in it's name fails
2010-09-17 16:04obilodeaumtn revision => 12f1379f5711d11d5ef5455850253bc0569e5593
2010-09-17 16:04obilodeauNote Added: 0001678
2010-09-17 16:04obilodeauStatusassigned => resolved
2010-09-17 16:04obilodeauFixed in Version => 1.9.1
2010-09-17 16:04obilodeauResolutionopen => fixed
2011-01-26 15:38obilodeauStatusresolved => closed

Notes
(0001677)
obilodeau   
2010-09-17 13:38   
This problem is not related to editing a category but viewing nodes in the given categories. To edit category you need to click on the menu on the left. To view nodes in a category you need to click on the category name.

Editing a category works:
Sep 17 13:32:15  [debug] I ran command: 'ARGS=nodecategory view 4' /usr/local/pf/bin/pfcmd
Returned:
Array
(
    [0] => category_id|name|notes
    [1] => 4|spaced category|test
)

Sep 17 13:32:28  [debug] I ran command: 'ARGS=nodecategory edit 4 name="spaced categorie", 
notes="test2"' /usr/local/pf/bin/pfcmd
Returned:
Array
(
)

Sep 17 13:32:28  [debug] nodecategory cache invalidated, will be reloaded on next nodecategory_caching 
call
Sep 17 13:32:29  [debug] I ran command: 'ARGS=nodecategory view all' /usr/local/pf/bin/pfcmd
Returned:
Array
(
    [0] => category_id|name|notes
    [1] => 1|default|Placeholder category, feel free to edit
    [2] => 2|test|test category
    [3] => 3|PC|PC category
    [4] => 4|spaced categorie|test2
)


but viewing list of node under a category clearly fails:
Sep 17 13:32:01  [debug] I ran command: 'ARGS=node view category=spaced category order by mac asc limit 
0,25' /usr/local/pf/bin/pfcmd
Returned:
Array
(
    [0] => Command not understood. (pfcmd grammar test failed at line 214.)
[...]
(0001678)
obilodeau   
2010-09-17 16:04   
the fix required a grammar change in pf::pfcmd to allow "...(space)..." parameters and enclosing categories.php calls to node filters with double quotes

Tested the fix on Chrome, Firefox and IE because I wasn't sure if the way I added the double-quotes to the parameter had uniform behavior on all browsers.