Bug 106406 - broken interface for adding/removing linked categories
broken interface for adding/removing linked categories
Status: CLOSED RAWHIDE
Product: Red Hat Enterprise CMS
Classification: Retired
Component: ui (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: Vadim Nasardinov
Jon Orris
:
Depends On:
Blocks: 106481 109665
  Show dependency treegraph
 
Reported: 2003-10-06 16:13 EDT by Vadim Nasardinov
Modified: 2007-04-18 12:58 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-03 12:36:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
screenshot showing the broken UI (40.00 KB, image/png)
2003-10-06 16:15 EDT, Vadim Nasardinov
no flags Details
the way it works in 5.2 (16.67 KB, image/png)
2003-11-24 11:59 EST, Vadim Nasardinov
no flags Details

  None (edit)
Description Vadim Nasardinov 2003-10-06 16:13:10 EDT
In change 33951, a JavaScript-based UI for category assignment
was added.  This change appears to have broken another (somewhat
related) piece of UI.

Go to the "Categories" tab of the content section page. Select
a category from the tree of categories displayed on the left-hand
side.

Under the "Category details" pane on the right-hand side, there
should be a button that says "Add or remove linked categories".

If you click on this button, you'll get a broken piece of UI:
The box entitled "Available categories" is empty, although it
shouldn't be.  The box is supposed to be populated by a JavaScript
script produced by
//cms/dev/web/packages/content-section/www/generate-category-javascript.jsp

The box is empty because the URL to the above JSP is incorrect.  If you
look at the produced HTML, the value of the "src" attribute is this:
<script language="javascript"
src="generate-category-javascript.jsp?outputType=text/javascript&amp;rootID=&amp;formName=LinkForm"></script>

What should be is something like this:
<script language="javascript"
src="/ccm/content/generate-category-javascript.jsp?outputType=text/javascript&amp;rootID=143&amp;formName=CategoryForm143"></script>

Note that the prefix "/ccm/content/" is missing in the former case.

The offending class is probably com.arsdigita.cms.ui.category.LinkForm.
Compare it to com.arsdigita.cms.ui.authoring.ItemCategoriesForm.

See also //cms/web/__ccm__/static/cms/admin/category-tree/authoring-step.xsl
Comment 1 Vadim Nasardinov 2003-10-06 16:15:46 EDT
Created attachment 94955 [details]
screenshot showing the broken UI
Comment 2 Vadim Nasardinov 2003-11-24 11:59:42 EST
Created attachment 96153 [details]
the way it works in 5.2
Comment 3 Vadim Nasardinov 2003-11-24 12:07:39 EST
This is also broken in 6.0 in the same way that it is broken on the
trunk.

The way it used to work in 5.2 is shown in attachment 96153 [details]. 

In 5.2,

 1. Go to the "Content" content section.
 2. Click on the "Categories" tab.
 3. Click on "Industries" (under Root / Business / Industries).
 4. Click on "Edit Links".
 5. Select " Arts/Television" and move it to the right.
 6. Click "Finish".

 The following row has been added to the cat_category_category_map table:

 select * from cat_category_category_map;
  category_id | related_category_id | default_p | sort_key | relation_type 
 -------------+---------------------+-----------+----------+---------------
 ..........................................................................
         1057 |                1061 |           |       29 | child
 (29 rows)

where

select * from cat_categories;
 category_id |     name     |  description  | enabled_p | abstract_p | default_ancestors 
-------------+--------------+---------------+-----------+------------+-------------------
        1021 | /            | Root Category | 1         | 0          | 1021/
        1055 | Arts         | Arts          | 1         | 0          | 1054/1055/
        1057 | Television   | Television    | 1         | 0          | 1054/1055/1057/
        1059 | Business     | Business      | 1         | 0          | 1054/1059/
        1061 | Industries   | Industries    | 1         | 0          | 1054/1059/1061/
.........................................................................................
(32 rows)
Comment 4 Vadim Nasardinov 2003-12-02 17:30:39 EST
I fixed the regression from 5.2 in change 38432.

The fix merely restores the old pre-6.0 behavior.  I did not try
to make LinkForm use the newfangled JavaScript-based category
tree selection form (ItemCategoriesForm).  So, the end result is
that the "Category assigment" step of the authoring kits uses the
nifty new JavaScript-based UI than Dan added.  The "Add or remove
linked categories" section uses the old UI with multi-select boxes.

I'll open a new ticket for sorting out this JavaScript-based tree
business to make sure we integrate the JavaScript-based widget
throughout CMS.

Comment 5 Vadim Nasardinov 2003-12-02 17:38:14 EST
Any remaining issues should be posted to bug 111392 (unless
change 38432 introduced new bugs, in which case this ticket
should be reopened).

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