Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Bug with categories on add_error page.

Quote Reply
Bug with categories on add_error page.
I have been testing out the new 2.0beta, and found that there is a bug with the categories on the add_error page. If someone makes a mistake on the add page (with the category already selected), when taken to the add_error page, the category field shows the following:

Unknown Tag: 'Category'

This happens regardless of whether db_gen_category_list is turned off or on.

Is there an easy fix to this? The error page is pretty much useless unless the category field is transferred. =P



Rob Bartlett
AAA Internet Publishing, Inc.
http://www.AAAInternet.com
Quote Reply
Re: Bug with categories on add_error page. In reply to
I'm not following, but are you using your own template set, or the default set?


In add.cgi the Category=>$category is passed in the original create form. It becomes part of the $IN hash. In any subsequent form, the tag should be passed.

Check your templates carefully. There have been some changes through the different versions on how the category was handled.

Looking carefully at &add_link

$category is assigned, but it's not passed in the bad_reffers, you need to add
Category=>$category to the passed value hash. It is passed in other error routines.

Code:
$cid = $input->{'CatLinks.CategoryID'} or return { error => Links::language('ADD_SELCAT'), Category => $category };
$sth = $cdb->select ( { ID => $cid }, ['Full_Name'] );
$sth->rows or return { error => Links::language('ADD_INVALIDCAT', $cid), Category => $category };
The 'CatLinks.CategoryID' is not passed in any longer from any of the templates (at least by a grep)


So... these are oddities, but I don't have a real solution for you. Check your templates. Make sure they are passing Category.


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Bug with categories on add_error page. In reply to
I don't think it really matters what template set I am using, I am pretty certain that there is only one way to set up the category field on the add and add_error pages. Regardless, I also tested with the default template and the same problem occured.

I am just using the following simple call on my pages:

<%Category%>

It worked fine with previous versions, but it is not working with beta, producing the message I indicated earlier.

I guess I am just pointing out this "bug" because the error templates are pretty much useless since the category value is not being passed to the new error form.


Rob Bartlett
AAA Internet Publishing, Inc.
http://www.AAAInternet.com
Quote Reply
Re: Bug with categories on add_error page. In reply to
I just installed a fresh copy of the program, into a fresh database, and fresh directory.

The add form is working without a problem.

Really, check your templates. Also, make sure you are using the current version of the scripts, and the library is pointing to the right library.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Bug with categories on add_error page. In reply to
I did all of that, this is a fresh install. not sure why it isn't working properly. The add form is working (submissions are working), it just isn't passing the category value to the error page.

What is really strange, is the category is being passed properly to the modify_error page, it just isn't working for the add_error page. I tested this with the default template set, so I am thinking that it must be something wrong with the add.cgi script.


Rob Bartlett
AAA Internet Publishing, Inc.
http://www.AAAInternet.com
Quote Reply
Re: Bug with categories on add_error page. In reply to
There is definitely a problem with the default "add" templates, although I am not exactly sure what it is. =P

What I did to solve the problem was basically just use the template for the modify form and copy and pasted the code to the add form, removing any extra code I didn't need. Seems to be working now, kind of strange though. I noticed that the modify form had the following extra code:

<input type="hidden" name="LinkID" value="<%if LinkID%><%LinkID%><%endif%>">

But adding this to the add form by itself didn't fix the problem, which is why I copied over the entire form.


Rob Bartlett
AAA Internet Publishing, Inc.
http://www.AAAInternet.com
Quote Reply
Re: Bug with categories on add_error page. In reply to
Hmm, I'm not able to replicate this either, but I'll take a look further.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Bug with categories on add_error page. In reply to
Im experiencing this problem too!

Unfortunately before I saw this thread I added a new one called "Unknown Tag"

My add_error page also says "Category Tag Unknown"

Solutions would be appreciated!

Thanks
Paul Wilson.
Quote Reply
Re: Bug with categories on add_error page. In reply to
Hi,

I think I've tracked this down, there were a few error conditions that didn't pass back a category tag. It's rather complex, so I won't put the change here.

Cheers,

Alex

--
Gossamer Threads Inc.