Bug 106406 - broken interface for adding/removing linked categories
Summary: broken interface for adding/removing linked categories
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise CMS
Classification: Retired
Component: ui
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Vadim Nasardinov
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks: 106481 109665
TreeView+ depends on / blocked
 
Reported: 2003-10-06 20:13 UTC by Vadim Nasardinov
Modified: 2007-04-18 16:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-12-03 17:36:21 UTC
Embargoed:


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

Description Vadim Nasardinov 2003-10-06 20:13:10 UTC
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 20:15:46 UTC
Created attachment 94955 [details]
screenshot showing the broken UI

Comment 2 Vadim Nasardinov 2003-11-24 16:59:42 UTC
Created attachment 96153 [details]
the way it works in 5.2

Comment 3 Vadim Nasardinov 2003-11-24 17:07:39 UTC
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 22:30:39 UTC
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 22:38:14 UTC
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.