Gossamer Forum
Home : Products : Gossamer Links : Discussions :

add.cgi stopped sending post data

Quote Reply
add.cgi stopped sending post data
I'm not sure what's happening but on my add link page (add.cgi), when a user enters his new link data and hits submit, it just refreshes the add link page and displays his data in the fields again. It doesn't submit the post data to the server. And no error messages. It's like Links was wanting some additional post data and when it didn't get it, it refreshes the add link page and waits for it to be entered. Not sure what it's missing. Any ideas?

Btw, modify.cgi works ok and submits it's post data.

Last edited by:

yo Huge: Sep 17, 2014, 10:17 PM
Quote Reply
Re: [yo Huge] add.cgi stopped sending post data In reply to
Hi,

Do you have the "add" button, or at least it hidden?

i.e

Code:
<input type="submit" name="add" value="Add Link" />

..or if you don't have it as a button, add it as a hidden tag:

Code:
<input type="hidden" name="add" value="1" />

Otherwise, it could be something else (hard to know without seeing whats going on)

Hope that helps

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] add.cgi stopped sending post data In reply to
yes, i have the 'add' button.

Code:
<form action="<%db_cgi_url%>/add.cgi" method="POST" name="">

<div class="margin">
<table border ="0" cellspacing="3" cellpadding="0" width="700">
<%include form.txt%>
<tr>
<td></td>
<td>
<input type="SUBMIT" name="add" value="Add Link">
</td>
</tr>
</table>
</div>
</form>
Quote Reply
Re: [yo Huge] add.cgi stopped sending post data In reply to
Try changing the type="SUBMIT" to type="submit" (I doubt thats the problem, but its bad HTML ;))

Then try changing method="POST" to method="GET", and do a test. Paste the results you see (so I can see what values are being passed along)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] add.cgi stopped sending post data In reply to
the results from 'GET'

Code:
http://www.mysite.com/cgi-bin/links/add.cgi?Title=Tube&URL=http%3A%2F%2Fwww.tube.com&CatLinks.CategoryID=822&Description=a+new+tube&Recip_URL=http%3A%2F%2Fwww.tube.com&Contact_Name=user&Contact_Email=user%40tube.com&add=Add+Link

what is weird is in the Links admin, i see other users adding sites today so it's working on the server for other people. I tried 3 browsers on my laptop, no go. I tried a browser on another PC on a separate wireless adapter, no go.

modify.cgi is working so my server isn't blocking my IP.

i tried 2 different new users with adding links, no go. It's not producing any errors in the log file. It just keeps refreshing the default 'add link' page but with the users link data prefilled in.
Quote Reply
Re: [yo Huge] add.cgi stopped sending post data In reply to
Are you sure you have the error message set to show?

Code:
<%if error%>
There was an error: <%error%>
<%endif%>

Thats what its sounding like at the moment

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] add.cgi stopped sending post data In reply to
I have the template add_error.html on my server but Links doesn't call it when there's an error. I think this is because i have a really old install ('98) and some Links updates since which are conflicting with old or missing Links code. i added that code your provided on the add.html template and got this result:

Code:
There was an error: ADD_BADSTATUS
Quote Reply
Re: [yo Huge] add.cgi stopped sending post data In reply to
Hi,

Ok, so for that error - add this into your language settings (Build > User Language)
:
Code:
ADD_BADSTATUS => Your link could not be added because it is not accessible: %s.

Now for the problem - what site are you trying to add? Its possible its blocked for LWP::Simple requests (which I believe is how GLinks checks if the site is live)

You could just disable that feature for now - in Setup > User Options:

user_link_validation => No

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] add.cgi stopped sending post data In reply to
after i added that line to the language.txt file, the error said 'bad url format' so i submitted a link with full url, www and dot com and it works. thanks. also my language file has some bits of code at the top about Captcha or something which i removed. not sure if that had anything to do with it or not. i was trying to install captcha a while back and that script must have used the same language file. i never did get it to work. in any case, my add_error.html page in Links is not called. so i guess its an old not-used-anymore part of Links and so i'll just leave in the error message code you mentioned so ithe error message will show up at the top of the page.
Quote Reply
Re: [yo Huge] add.cgi stopped sending post data In reply to
Ok cool

Yeah, the error template is now either add.html or modify.html - depending on what you are doing. Just make sure you have the error message in both the templates:

Code:
<%if error%>
<p><font color="red">There was an error: <%error%> </font></p>
<%endif%>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] add.cgi stopped sending post data In reply to
yeah, it's missing from my modify.html template as well so i guess i'm using really old files.