Gossamer Forum
Home : Products : Links 2.0 : Customization :

Problem with templates!

Quote Reply
Problem with templates!
Maybe this is just my site, but try this on your if you use templates.

Go to add.cgi
Leave everything blank, especially the category.

On the resulting error page, the category display looks funny. How come?

------------------
Quote Reply
Re: Problem with templates! In reply to
CEGlobe,

I know what you are talking about. Happened on my site as well but when I updated my site to 2.0 final release, it seems like add.cgi was fixed. modify.cgi was okay it was just add.cgi . I'm sure you can replace just the add.cgi from the current download and it will fixed things right up.

I love your site by the way...

elms

------------------
-------------------------
http://www.webmerch.com links@webmerch.com

Quote Reply
Re: Problem with templates! In reply to
OK by the time I finished writing this message below, elms had posted a reply.

elms,

I am using 2.0 final. I am having the same problem

======
Yeah, me too. I think I noticed that once before but didn't really bother about it, since I was still testing and learning.

I think there may be a closing tag missing for the dropdown list ie select<option>




[This message has been edited by socrates (edited March 13, 1999).]
Quote Reply
Re: Problem with templates! In reply to
elms, i checked out your site and it is partially broken on that too.

Try this on yours:

Select a category but leave one of the other fields blank. You get the error saying something is missing,but not the category. So far so good. Then fill in everything properly and hit submit. It forgets the category. This is a crazy bug.

------------------
Quote Reply
Re: Problem with templates! In reply to
I tried it on both my Home Page's Add a Link and on a Category Page's Add A Links and had no problem. Wanna know why? I knew you would! Smile

Replace:

Quote:
$in{'Category'} or ($in{'Category'} = &build_select_field ("Category"));

with the following:

Quote:
my $category = &build_select_field ("Category", "$in{'Category'}");
delete $in{'Category'};

Then add this to the print &load_template ('add_error.html', { block:

Quote:
Category => $category,

This is in site_html_templates.pl, sub site_html_add_failure.

I hope this helps.

[This message has been edited by Bobsie (edited March 14, 1999).]
Quote Reply
Re: Problem with templates! In reply to
Bobsie,

Cool Bobsie, I was trying to figure that out from an earlier post you made that resulted in the same as your post just now...


http://www.gossamer-threads.com/...um9/HTML/000366.html

Disregard previous:
Quote:
Do you know why say if I navigate from say:

/Category/SubCat

then click on add site, it does not fill in the category in add.html?

Sometimes it registers it, sometimes it does not...

It does this because of the "&". If there is an "&" in the category name, db_utils.pl cannot interpret this in the &build_select_field routine.

Any ideas on how it can read in "&"?

Thanks in advance,
elms

[This message has been edited by elms (edited March 14, 1999).]
Quote Reply
Re: Problem with templates! In reply to
CEGlobe,

Come to think of it, if I navigate in a directory structure, it will not even insert the correct structure. It will leave the field blank. What the heck is going on?

Before in v2b5, it use to list all the categories on the same line when I left the category blank. If I would navigate to a directory and add site, it would fill it in as opposed to pulling the drop down menu and choosing the navigated path.

Confused here...

Could you look in the Search Mod for 2.0 post. I think you are using templates. Do you have any input on how to search deep in a chosen category?

Thanks in advance,
elms

Quote Reply
Re: Problem with templates! In reply to
Thank you Bobsie. Works like a charm!

------------------
Quote Reply
Re: Problem with templates! In reply to
 
Quote:
It does this because of the "&". If there is an "&" in the category name, db_utils.pl cannot interpret this in the &build_select_field routine.

Any ideas on how it can read in "&"?

i just noticed that also w/ the categories that have & in them
Quote Reply
Re: Problem with templates! In reply to
Maybe I have a different problem - as this
mod did not help my add a site error. I am getting the list of categories across the page on the add a site error page. Strange.

the URL is:
http://okemos-woodworks.com/genlink

Maybe someone could take a look and give
me a suggestion.

Jim
Quote Reply
Re: Problem with templates! In reply to
Jim,

Check your add_error.html file and see if it has this code in it:

Code:
<tr><td align="right" valign="top">Category:</td>
<td><%Category%> <input type=hidden name=Category value="<%Category%>">

If it does, change it to read:

Code:
<tr><td align="right" valign="top">Category:</td>
<td><%Category%>

That should fix it. The problem with the original code is, it is creating another Category <input> field in the form but, if you applied my fix as I said in the previous message, Category already is a select input field.

I hope this helps.

[This message has been edited by Bobsie (edited March 14, 1999).]
Quote Reply
Re: Problem with templates! In reply to
That did it. Thanks for the help...

Jim
Quote Reply
Re: Problem with templates! In reply to
Let's give a big hand to Bobsie. C'mon let's hear it. Go Bobsie, Go Bobsie...