Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Some Links Work; Some Don't...?

Quote Reply
Some Links Work; Some Don't...?
 Hello again...

I have been utilizing version 1.11 for some time and began having some links redirect properly while others don't, the url will append my root url to the beginning of the redirect url so the completed url looks like two urls in the location bar...
I installed version 2.0 into a new directory, ran the upgrade.pl, verified links.db & url.db are correct, linksid.txt reflects the last ID used, copied all the old directories/pages with the exception of the default ones created during installation. Rebuilt everything and all seems to function fine EXCEPT clicking on certain links appends the root url of my site to the beginning of the referenced url... Check it out and see if you get the same results:

One of the Categories:
http://soda-machines.com/links_v/Suppliers/

While in the above category, click on the first link labled "Retro Soda Inc" and you'll get an unusual url

Click on the next link down, Beverage Express, and you will be redirected correctly.

I cannot figure out why there's a difference with one leading to a wierd link and the other working...

This happens on several different links in different categories.

Thanks in Advance,
Jim
Quote Reply
Re: [SodaJim] Some Links Work; Some Don't...? In reply to
I think you inadvertantly posted a duplicate post, since you already posted about this issue before, correct?

http://www.gossamer-threads.com/...;;page=unread#unread

As suggested before, I would recommend downloading your links.db and using Excel to clean up the database file, and then upload the edited links.db file to your web server.

When you noticed that this problem was occurring, did you install any modifications around that time period? If so, what did you hack or install?
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Some Links Work; Some Don't...? In reply to
Thanks for the reply Stealth!
I did create a new topic since the original wasn't getting any replies and may have seemed misdirected too... I apologize for any inconveinence this may have caused!

As far as the links.db file is concerned, what do you mean by cleaning it up...?
When I upgraded to 2.0, I went through everything to see any difference between records that redirected properly and those that didn't; I really didn't notice anything out of the ordinary. I do know that Excel changed the date format and I had to correct all the date formats.
But what should I be looking for in "cleaning up" this file...?
Is there documentation for the format or the order of the fields of this file?

I appreciate your time!

Jim
Quote Reply
Re: [SodaJim] Some Links Work; Some Don't...? In reply to
removing any special characters or problem characters in the URL field.

OR delete all records in your URL.DB file and then re-build your directory, see if that clears up the problem as well.

And there were plenty of helpful hints and tips posted in the other thread.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Some Links Work; Some Don't...? In reply to
Thanks again Stealth!

I feel stupid on this one since I figured the problem w/ the redirect errors...
A small number of the end users entered the url without the "http://", so I'm going to review the form to add a new resource and include this in the form tags to the end user will see this and hopefully know to include the "http://"...

On another note, I can't seem to find documentation on enabling Ratings or the ability to Rate a Resource... Any direction appreciated!

Jim
Quote Reply
Re: [SodaJim] Some Links Work; Some Don't...? In reply to
Well, that makes sense. What you could is one of the following:

1) Put http:// as the initial value in the URL field in the ADD form.

2) Insert http:// via the ADD.CGI script if there is no HTTP, although this will cause problems for people wanting to link listserv addresses (which should start with MAILTO).

3) Use a Javascript error check to make sure that the URL field starts with http:// -OR- activate the server side error checking codes by making sure that there are regexp values in the URL field configurations in the %db_fields hash in the LINKS.DEF file.

With regards to "Rating"....looks like you have overwritten the default codes in the link.html file.

Basically, all you have to do is the following:

1) Make sure that RATE.CGI is uploaded to the cg-bin/links or wherever you have ADD.CGI, SEARCH.CGI, etc.

2) Then in the link.html file, add the following codes:

Code:

<a href="<%db_cgi_url%>/rate.cgi?ID=<%ID%>">Rate this Resource</a>


If memory serves me correct, wasn't the RATING feature available in Links 1.11, that you were using before.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Some Links Work; Some Don't...? In reply to
Thanks again Stealth!

Since I'm utilizing site_html.pl instead of templates, where can I reference documentation to implement Ratings...? Or do I have to use templates for this feature?
I do have the rate.cgi file but not the link.html file on the server; since this was an upgrade and I opted not to utilize templates, I don't see how or where to include the link code you posted...
The code uses the variable <%ID%> for rate.cgi to allow a user to reference a particular resource... If I add this code into the proper script, will it automatically include each resource ID after a "Build All" or does this have to be done manually...?
OR am I missing something all together...?

Thanks again,
Jim
Quote Reply
Re: [SodaJim] Some Links Work; Some Don't...? In reply to
You can use the following codes:

Code:

<a href="$db_cgi_url/rate.cgi?ID=$rec{'ID'}">Rate this Site</a>


You might really consider using the templates, since they are easier to maintain.
========================================
Buh Bye!

Cheers,
Me