Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-06-07 23:34:39

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Weird URL shortening upon comment submission

The site is ProWeb.cc (just converted to TXP from a custom CMS)

I’ve never had this happen before on other sites, but it happens every time a user submits a comment. For example, when the URL is /frames-yes-or-no, the comment preview will be fine, but when the user submits a comment, the URL is shortened to /frames-ye?commented=1#cpreview, and returns a 404 error. The comment is still received and displays after reloading though.

  • The .htaccess is stock, aside from a few 301 redirects. Register globals is off.
  • Comments auto_append is off (nopopup mode)

I think it’s an htaccess problem, but I’m clueless when it comes to that.

Thanks,
JM

Last edited by deldindesign (2006-06-08 00:23:23)

Offline

#2 2006-06-08 00:00:36

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Weird URL shortening upon comment submission

Is it only that article in particular that’s doing it?

Offline

#3 2006-06-08 00:22:24

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Weird URL shortening upon comment submission

Nope- site wide, unfortunately.

Offline

#4 2006-06-08 00:56:50

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Weird URL shortening upon comment submission

Does placing your site in debugging production mode offer any clues (i.e: change setting to debugging, then try submitting a comment)?

Offline

#5 2006-06-08 01:48:05

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Weird URL shortening upon comment submission

I can’t tell—it’s in debugging mode right now, but I still get the shortened URL upon submit. Messy url’s work, so it has to be an htaccess problem, right? I think it’s hosted by GoDaddy or AM hosting, so I’ll check the htaccess tweaks thread in a sec.

I removed the redirects also (search engines finally updated):

<pre><code>
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php </IfModule>

php_value register_globals 0
</code></pre>

Form: article

<code>
<h2><txp:title /> <span id=“published”><txp:author link=“y” /> on <txp:posted /></span></h2> <txp:body />
<txp:if_comments> <h3>Comments</h3> <txp:comments />
</txp:if_comments>
<txp:if_comments_preview> <div class=“comments” id=“cpreview”> <p><strong>The following is a comment preview ↓</strong></p> <txp:comments_preview /> </div> <txp:comments_form preview=“1” /> <txp:else /> <txp:comments_form />
</txp:if_comments_preview>
</code>

comment_form

<code>
<legend>Have Your Say</legend>
<txp:comments_error />
<p><label for=“message”><txp:text item=“message” /></label>
<txp:comment_message_input /></p>
<p><label for=“name”><txp:text item=“name” /></label>
<txp:comment_name_input /></p>
<p><label for=“email”><txp:text item=“email” /></label>
<txp:comment_email_input /></p>
<p><label for=“web”>http://</label>
<txp:comment_web_input /></p>
<p><txp:comments_help /></p>
<p><txp:comment_remember /></p>
<p><txp:comment_preview /><txp:comment_submit /></p>
</code>

Thanks for the help—I’ll get the host info soon.

Last edited by deldindesign (2006-06-08 01:49:11)

Offline

#6 2006-06-08 05:59:26

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Weird URL shortening upon comment submission

OK, it’s hosted by AM Hosting /Hostrack (php info. I just tried every .htaccess tweak to no avail.

Since it’s only the submitted comment giving the 404 error, is there a way to redirect the user back to the article, once they submit?

Offline

#7 2006-06-08 07:24:11

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Weird URL shortening upon comment submission

Since it’s only the submitted comment giving the 404 error, is there a way to redirect the user back to the article, once they submit?

No, the submitting works fine. After the submit we redirect the user to the article already, and that’s where the url is shortened.

What is your value for “max_url_len”/“Max URL length” in advanced preferences?

Offline

#8 2006-06-08 07:46:07

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Weird URL shortening upon comment submission

I’ve got it set at 20, though many of the URL’s are longer than that. I’ll increase it to 35, and see what happens.

edit: Rats! Still gets shortened upon submit, even at 35.

Last edited by deldindesign (2006-06-08 07:47:50)

Offline

#9 2006-06-08 09:08:52

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Weird URL shortening upon comment submission

The default value is 200. I think you misunderstand the purpose. It has nothing to do with the urls that are generated, instead it is a simple (yet effective) measure to limit the amount of damage that might be done through a hole in GET-parameter handling , e.g. in plugins. The length applies to the complete url, including domain etc., whenever a url is encountered that is longer than this value it is cut-off at the specified length.

Offline

Board footer

Powered by FluxBB