Menu

#20 Can't set uncategorised as parent of a category

open
None
8
2005-06-01
2005-06-01
No

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.

Discussion

  • Peter Harris

    Peter Harris - 2005-06-01

    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

     
  • Peter Harris

    Peter Harris - 2005-06-02

    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
    ------------------------------------------

     

Log in to post a comment.

MongoDB Logo MongoDB