In category admin screen, "Uncategorised" never appears
in the "Special case of" select list, so a category
can't be made a top-level category, but has to be a
sub-category of another.
The fix is to change the SQL in
operator/admin/category/sel_c_maybe_parent
thus:
--------------------------------------
select c_cat as parent,c_name as parent_name
from category where
c_cat <> <dtml-sqlvar c_cat type=string> and
(c_parent <> <dtml-sqlvar c_cat type=string> or c_parent
is null)
---------------------------------------
The problem was that although null is never equal to a
string, "null <> something" is always null, not true.
The uncategorised category seems to have a null in its
c_parent field.
Will be fixed in next release
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There's a related bug, which can be fixed by changing the
SQL of operator/admin/category/sel_c_children
--------------------------------------------------
select c_cat as cat, c_name, c_advice, c_usual_pri from
category where
c_cat <> '<dtml-var c_cat_prefix>' and /* top level
category is not the child of anything! */
(c_parent = <dtml-sqlvar cat type=string> or
(c_parent is null and <dtml-sqlvar cat type=string> = ''))
order by cat
------------------------------------------
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=8911
The fix is to change the SQL in
operator/admin/category/sel_c_maybe_parent
thus:
--------------------------------------
select c_cat as parent,c_name as parent_name
from category where
c_cat <> <dtml-sqlvar c_cat type=string> and
(c_parent <> <dtml-sqlvar c_cat type=string> or c_parent
is null)
---------------------------------------
The problem was that although null is never equal to a
string, "null <> something" is always null, not true.
The uncategorised category seems to have a null in its
c_parent field.
Will be fixed in next release
Logged In: YES
user_id=8911
There's a related bug, which can be fixed by changing the
SQL of operator/admin/category/sel_c_children
--------------------------------------------------
select c_cat as cat, c_name, c_advice, c_usual_pri from
category where
c_cat <> '<dtml-var c_cat_prefix>' and /* top level
category is not the child of anything! */
(c_parent = <dtml-sqlvar cat type=string> or
(c_parent is null and <dtml-sqlvar cat type=string> = ''))
order by cat
------------------------------------------