Bug 99043 - in category-based search, each category is listed twice in the drop-down list
in category-based search, each category is listed twice in the drop-down list
Status: CLOSED WONTFIX
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: ccm-bugs-list
Jon Orris
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-12 12:27 EDT by Vadim Nasardinov
Modified: 2007-04-18 12:55 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-03 14:26:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Vadim Nasardinov 2003-07-12 12:27:03 EDT
If the interMedia-based search is enabled, the content section's "Search" tab
allows you to narrow the search by category.
(This is not supported in the lucene-based search.)

You can select the categories from the multiple-select box.  The
problem is, each of the categories is listed twice.  Looking at the
HTML source reveals that these duplicates have different id values.

Whatever the reason between have the same category appear under
two different id's on the backend, exposing this on the front-end
does not seem to make a whole lot of sense.

I should mention that the category displayed in the authoring kits
does not suffer from this.  Each category is listed only once.

Here's the HTML source of the drop-down list:

<select name="categories" multiple="" size="10">
<option value="131">Alternative</option>
<option value="184">Alternative</option>
<option value="116">Arts</option>
<option value="133">Arts</option>
<option value="169">Arts</option>
<option value="186">Arts</option>
<option value="120">Business</option>
<option value="173">Business</option>
<option value="124">Computers</option>
<option value="177">Computers</option>
<option value="129">Fitness</option>
<option value="182">Fitness</option>
<option value="127">Hardware</option>
<option value="180">Hardware</option>
<option value="128">Health</option>
<option value="181">Health</option>
<option value="122">Industries</option>
<option value="175">Industries</option>
<option value="125">Internet</option>
<option value="178">Internet</option>
<option value="123">Investing</option>
<option value="176">Investing</option>
<option value="121">Jobs</option>
<option value="174">Jobs</option>
<option value="132">Kids</option>
<option value="185">Kids</option>
<option value="130">Medicine</option>
<option value="183">Medicine</option>
<option value="117">Movies</option>
<option value="170">Movies</option>
<option value="119">Music</option>
<option value="172">Music</option>
<option value="115">Root</option>
<option value="168">Root</option>
<option value="134">School Time</option>
<option value="187">School Time</option>
<option value="126">Software</option>
<option value="179">Software</option>
<option value="135">Teen Life</option>
<option value="188">Teen Life</option>
<option value="118">Television</option>
<option value="171">Television</option>
</select>
Comment 1 Vadim Nasardinov 2003-07-12 12:29:05 EDT
My speculation is, the list of categories is not filtered by section.
I have two content sections in my setup.  They have identical (yet
physically distinct) category trees.  I am guessing, the drop-down
list is populated by querying all categories out of the categories table,
without restricting it to a single section.
Comment 2 Daniel Berrange 2003-07-14 05:19:04 EDT
Vadim, can you check what XML files your enterprise.init is specifying for
loading categories. The default configuration should load
'/WEB-INF/resources/article-categories.xml' into the /content/ section and
'/WEB-INF/resources/form-categories.xml' into the '/forms/' section. Change
24890 way back when we were doing 5.2 dev made sure that both these files
specified different categories precisely to avoid the confusion in the seach box
that is described above. In addition, doing a 'select * from cat_categories' in
my newly loaded DB doesn't show any duplicated categories:

dan_troika=# select category_id, name, default_ancestors from cat_categories
order by name;
 category_id |     name     | default_ancestors 
-------------+--------------+-------------------
          28 | /            | 28/
        4010 | /            | 4010/
          53 | Alternative  | 37/50/53/
          38 | Arts         | 37/38/
          55 | Arts         | 37/54/55/
        4022 | Bugs         | 4019/4020/4022/
          42 | Business     | 37/42/
          46 | Computers    | 37/46/
        4025 | Events       | 4019/4024/4025/
        4020 | Feedback     | 4019/4020/
          51 | Fitness      | 37/50/51/
        4021 | General      | 4019/4020/4021/
          49 | Hardware     | 37/46/49/
          50 | Health       | 37/50/
          44 | Industries   | 37/42/44/
          47 | Internet     | 37/46/47/
          45 | Investing    | 37/42/45/
          43 | Jobs         | 37/42/43/
          54 | Kids         | 37/54/
          52 | Medicine     | 37/50/52/
          39 | Movies       | 37/38/39/
          41 | Music        | 37/38/41/
        4027 | Other        | 4019/4024/4027/
        4026 | Profile      | 4019/4024/4026/
        4024 | Registration | 4019/4024/
          37 | Root         | 37/
        4019 | Root         | 4019/
          56 | School Time  | 37/54/56/
          48 | Software     | 37/46/48/
        4023 | Suggestions  | 4019/4020/4023/
          57 | Teen Life    | 37/54/57/
          40 | Television   | 37/38/40/
(32 rows)

dan_troika=# 
Comment 3 Vadim Nasardinov 2003-07-14 14:17:51 EDT
I have two content sections that load the same category tree.  Hence
the duplicate.  Making sure that no two categories have the same name
in two separate category trees sounds like a non-solution to me.
Correct me if I am wrong, but the the search interface located under
the "Search" tab of the content section page is meant to be restritec
to that content section.  Therefore, the category tree should also be
one used for that content section.

I have two content sections:

SQL> select section_id, pretty_name from content_sections;

SECTION_ID|PRETTY_NAME
----------|------------------------------
       110|articles
       161|cs2


Each of them has a separate category tree:

SQL> select * from cat_root_cat_object_map;

CATEGORY_ID| OBJECT_ID
-----------|----------
        167|       161
        116|       110



The category tree for content section 110 looks like so:

SQL> select category_id, name
from cat_categories
where default_ancestors like '116/%';
  2    3  
CATEGORY_ID|NAME
-----------|--------------------
        116|Root
        117|Arts
        118|Movies
        119|Television
        120|Music
        121|Business
        122|Jobs
        123|Industries
        124|Investing
        125|Computers
        126|Internet
        127|Software
        128|Hardware
        129|Health
        130|Fitness
        131|Medicine
        132|Alternative
        133|Kids
        134|Arts
        135|School Time
        136|Teen Life

21 rows selected.


The category tree for content section 161 looks like so:

SQL> select category_id, name
from cat_categories
where default_ancestors like '167/%';
  2    3  
CATEGORY_ID|NAME
-----------|--------------------
        167|Root
        168|Arts
        169|Movies
        170|Television
        171|Music
        172|Business
        173|Jobs
        174|Industries
        175|Investing
        176|Computers
        177|Internet
        178|Software
        179|Hardware
        180|Health
        181|Fitness
        182|Medicine
        183|Alternative
        184|Kids
        185|Arts
        186|School Time
        187|Teen Life

21 rows selected.


Is there any reason not to filter the drop-down list of categories by
section?
Comment 4 Vadim Nasardinov 2003-07-14 14:35:34 EDT
To avoid confusion, I should make it clear that I ran the queries
against a different server instance.  Hence the mismatch between
the id's in my original post and my previous comment.
Comment 5 Vadim Nasardinov 2005-08-03 14:26:03 EDT
stale

Note You need to log in before you can comment on or make changes to this bug.