Gossamer Forum
Quote Reply
category browser bugs

found this one...

1. click on a category
2. click "move"
3. click on the same category again (to move within itself)

4. Script returns error to content page and redraws tree.
5. Now click on "any" category the redrawn tree and the whole site reloads into the browser tree panel.


Last edited by:

ryel01: Apr 4, 2006, 9:42 PM
Quote Reply
Re: [ryel01] category browser bugs In reply to
One fix that seems to work...

Inside Browser.pm the javascript_error sub routine returns this code:

if ($args->{tree_go}) { print qq |parent.frames[parent.LEFT_FRAME_ID].history.go ($args->{tree_go});| }

Trouble is the javascript tree doesn't like going back in history, so if you replace that line with this:

if ($args->{tree_go}) { print qq |parent.draw_tree();| }

It instructs the code to redraw the tree in the current state again.

Quote Reply
Re: [ryel01] category browser bugs In reply to
Thanks, I've commited something similar to cvs.

Quote Reply
Re: [brewt] category browser bugs In reply to
Hi Adrian

The info page (middle one) also throws back an error too.

What I did was to move the checking of parent id etc back up into the javascript in browser.html instead of being handled by the cgi script.

So for eg. when I click on move to "move" a category, I add 1 more javascript variable into the category_move_form page = FatherID.

Then when I click on a new folder to move that category into, the javascript in browser.html gets the current FatherID from that page - instead of having to post it back to the script and do the checking there.

So you can then have it check (via javascript) if they're trying to move the folder inside itself, or into the folder it is already inside... and just pop up an alert box for the error.