Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Modify Category

Quote Reply
Modify Category
I've been getting Link Changes that have nothing different as far as I can tell, and today I found out why.

When a LinkOwner selects a different category for their link, it doesn't show up in the admin area. The old category is highlighted instead.

I just installed 2.0.5 and tried modifying a link with the Gossamer default template set, so I don't think it's a problem with my page templates. Is it possible the admin templates have an error?

Has anyone else noticed this problem?

Bryan

Quote Reply
Re: Modify Category In reply to
Hi,

Thanks for catching this. In Links/Tools.pm line 630, right above:

my $form = $html->form ( ... );

add:

$link->{$i . "-CatLinks.CategoryID"} = $link->{'CatLinks.CategoryID'};

and it will set it properly.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Modify Category In reply to
I tried your suggestion and it didn't seem to work. I added the line here:

$link->{'CatLinks.CategoryID'} = \@cat_ids;
$link->{$i . "-CatLinks.CategoryID"} = $link->{'CatLinks.CategoryID'};
my $form = $html->form ( { values => $link, extra_table => 0, mode =>

And, on the off chance that I should have deleted a line as well I tried this:


$link->{$i . "-CatLinks.CategoryID"} = $link->{'CatLinks.CategoryID'};
my $form = $html->form ( { values => $link, extra_table => 0, mode =>

Neither one worked, and it didn't generate an error message either.

Bryan

Quote Reply
Re: Modify Category In reply to
Hello

I have this problem too, the validate changes still shows the original category in selectbox, and not the new category

Quote Reply
Re: Modify Category In reply to
Is it possible to get access to one of these systems?

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Modify Category In reply to
Hi,

That was the wrong place, you need to make the change around line 630 (on yours it was 627). I made the change and it's now working.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Modify Category In reply to
Alex,
Please be more specific as to the location for applying the fix. "around line 630" to someone that is unfamiliar with how this string of code works is not helpful. My search for the string "my $form = $html->form (...)" returns results at line 625.

Thank you.

Scott

Quote Reply
Re: Modify Category In reply to
Hi,

Look in sub validate_changes in Links/Tools.pm. Then after:

my $update_user = '';

add:

$link->{$i . "-CatLinks.CategoryID"} = $link->{'CatLinks.CategoryID'};

and it will fix things.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Modify Category In reply to
Alex,
Thank you. That hit the spot.

Scott