Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-07-05 06:54:36

janw
Member
From: Groningen
Registered: 2005-11-18
Posts: 47

Comment preview broken, url incorrect

My preview is not working anymore.
It points to: http://www.domain.nl/id=78#cpreview instead of http://www.domain.nl/index.php?id=78#cpreview

How can I change the settings so it will point to “http://www.domain.nl/index.php?id=78#cpreview”

Thanks

(Edit: updated discussion topic. -Mary)

Last edited by Mary (2007-07-05 20:37:35)

Offline

#2 2007-07-05 20:36:56

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

Re: Comment preview broken, url incorrect

Try removing your htaccess file.

Offline

#3 2007-07-05 21:40:02

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

Re: Comment preview broken, url incorrect

Can you post your diagostics and a link to the page in question?

Offline

#4 2007-07-06 06:32:36

janw
Member
From: Groningen
Registered: 2005-11-18
Posts: 47

Re: Comment preview broken, url incorrect

It’s on a window-server so no htaccess :-)
Maybe the ISAP rewrite?

Anyway here’s the diagnosis:

Textpattern versie: 4.0.3 (r1188)
last_update: 2006-02-27 21:07:01/2006-02-27 21:46:58
Document root:
Permanente link modus: messy
upload_tmp_dir: c:/temp
Tijdelijke bestanden map: C:\WINDOWS\TEMP
Site URL: www.sprt.nl
PHP versie: 5.2.0
server_time: 2007-07-06 08:30:41
MySQL: 5.0.27
Localisatie: Dutch_Netherlands.1252
Server: Microsoft-IIS/6.0
php_sapi_mode: cgi-fcgi
os_version: Windows NT 5.2

Offline

#5 2007-07-06 17:25:36

janw
Member
From: Groningen
Registered: 2005-11-18
Posts: 47

Re: Comment preview broken, url incorrect

anyone?

Offline

#6 2007-07-06 17:38:31

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Comment preview broken, url incorrect

Can you put this in the template for a page that contains a comment form:

<txp:php>global $pretext; dmp($pretext);</txp:php>

That should show some debug information when visiting the page. I suspect the request_uri is not set correctly.

Last edited by ruud (2007-07-06 17:40:27)

Offline

#7 2007-07-06 18:10:08

janw
Member
From: Groningen
Registered: 2005-11-18
Posts: 47

Re: Comment preview broken, url incorrect

[id] => 78 [s] => blog © => [q] => [pg] => [p] => [month] => [author] => [request_uri] => id=78 [qs] => id=78 [subpath] => \/ [req] => [status] => 200 [page] => blog [next_id] => [next_title] => [next_utitle] => [next_posted] => [prev_id] => 77 [prev_posted] => 1178008073 [id_keywords] => [path_from_root] => / [pfr] => / [path_to_site] => D:\www\sprt.nl\www [permlink_mode] => messy [secondpass] =>

Strange thing is that if I show the first 5 items (only the excerpts) and click on “read more” the link is correct:

http://www.sprt.nl/index.php?id=78#commentaar

so with the “index.php?”-part

Offline

#8 2007-07-06 21:58:06

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Comment preview broken, url incorrect

I can’t reproduce the ‘read more’ behaviour you describe (I get broken URLs in the comment form, no matter how I visit them). Can you provide an exact click path that takes me to that page?

And instead of the code I gave before, can you post the results of this (and the URL of the page you’re visiting at that point). Make sure that it’s a page with a form that has an incorrect URL:

<txp:php>dmp($_SERVER);</txp:php>

Because the problem is in how ‘request_uri’ is detected. Probably yet another IIS issue. Looking at the TXP code, there are already two workarounds in place to make it work on IIS, but perhaps a third is needed.

Last edited by ruud (2007-07-06 21:58:38)

Offline

#9 2007-07-07 07:22:30

janw
Member
From: Groningen
Registered: 2005-11-18
Posts: 47

Re: Comment preview broken, url incorrect

[ALLUSERSPROFILE] => C:\Documents and Settings\All Users
    [APP_POOL_ID] => DefaultAppPool
    [CommonProgramFiles] => C:\Program Files\Common Files
    [COMPUTERNAME] => NET3-NL-IIS-66
    [ComSpec] => C:\WINDOWS\system32\cmd.exe
    [FP_NO_HOST_CHECK] => NO
    [NUMBER_OF_PROCESSORS] => 4
    [OS] => Windows_NT
    [Path] => C:\Program Files\Support Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Dell\SysMgt\oma\bin;C:\Program Files\Dell\SysMgt\Array Manager
    [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    [PROCESSOR_ARCHITECTURE] => x86
    [PROCESSOR_IDENTIFIER] => x86 Family 15 Model 4 Stepping 1, GenuineIntel
    [PROCESSOR_LEVEL] => 15
    [PROCESSOR_REVISION] => 0401
    [ProgramFiles] => C:\Program Files
    [SystemDrive] => C:
    [SystemRoot] => C:\WINDOWS
    [TEMP] => C:\WINDOWS\TEMP
    [TMP] => C:\WINDOWS\TEMP
    [USERPROFILE] => C:\Documents and Settings\Default User
    [windir] => C:\WINDOWS
    [HTTP_CONNECTION] => keep-alive
    [HTTP_KEEP_ALIVE] => 300
    [HTTP_ACCEPT] => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
    [HTTP_ACCEPT_ENCODING] => gzip,deflate
    [HTTP_ACCEPT_LANGUAGE] => nl,en-us;q=0.7,en;q=0.3
    [HTTP_COOKIE] => testcookie=enabled
    [HTTP_HOST] => www.sprt.nl
    [HTTP_REFERER] => http://www.sprt.nl/index.php?s=blog
    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
    [HTTP_X_REWRITE_URL] => /index.php?id=78
    [AUTH_TYPE] => 
    [AUTH_PASSWORD] => 
    [AUTH_USER] => 
    [CERT_COOKIE] => 
    [CERT_FLAGS] => 
    [CERT_ISSUER] => 
    [CERT_SERIALNUMBER] => 
    [CERT_SUBJECT] => 
    [CONTENT_LENGTH] => 0
    [CONTENT_TYPE] => 
    [GATEWAY_INTERFACE] => CGI/1.1
    [HTTPS] => off
    [HTTPS_KEYSIZE] => 
    [HTTPS_SECRETKEYSIZE] => 
    [HTTPS_SERVER_ISSUER] => 
    [HTTPS_SERVER_SUBJECT] => 
    [INSTANCE_ID] => 86119
    [LOCAL_ADDR] => 213.19.164.11
    [LOGON_USER] => 
    [QUERY_STRING] => id=78
    [REMOTE_ADDR] => 85.145.136.34
    [REMOTE_HOST] => 85.145.136.34
    [REMOTE_USER] => 
    [REQUEST_METHOD] => GET
    [SCRIPT_NAME] => /index.php
    [SERVER_NAME] => www.sprt.nl
    [SERVER_PORT] => 80
    [SERVER_PORT_SECURE] => 0
    [SERVER_PROTOCOL] => HTTP/1.1
    [SERVER_SOFTWARE] => Microsoft-IIS/6.0
    [UNMAPPED_REMOTE_USER] => 
    [ORIG_PATH_TRANSLATED] => d:\www\sprt.nl\www\index.php
    [ORIG_PATH_INFO] => /index.php
    [ORIG_SCRIPT_NAME] => /index.php
    [SCRIPT_FILENAME] => d:\www\sprt.nl\www\index.php
    [PHP_SELF] => /index.php
    [REQUEST_TIME] => 1183792778
    [argv] => Array
        (
            [0] => id=78
        )

    [argc] => 1

(Edit: updated to display output more clearly. -Mary)

It has to be IIS because it did work. I remember asking them for ISAPI rewrite but they didn’t do this. Now they’ve got this.
I just noticed this failure.

The read more behavior is when you click on “blog” first not directly on a title of an article.

Last edited by Mary (2007-07-09 02:05:38)

Offline

#10 2007-07-07 08:52:18

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Comment preview broken, url incorrect

The interesting parts are:

    [HTTP_X_REWRITE_URL] => /index.php?id=78
    [QUERY_STRING] => id=78
    [ORIG_PATH_INFO] => /index.php
    [ORIG_SCRIPT_NAME] => /index.php
    [PHP_SELF] => /index.php
    [SCRIPT_NAME] => /index.php
    [argv] => Array
        (
            [0] => id=78
        )

From what I’ve read, I’d say that ASAPI rewrite is active, otherwise I can’t explain the existence of HTTP_X_REWRITE_URL

I have to ask, did you really do this on a page that has a broken URL?
Because that would be very strange. You see, the SCRIPT_NAME is defined and so is the QUERY_STRING. That should be trigger TXP to build a request_uri using those two variables. Instead it appears to use argv and that makes no sense.

Last edited by ruud (2007-07-07 08:53:21)

Offline

#11 2007-07-07 09:45:05

janw
Member
From: Groningen
Registered: 2005-11-18
Posts: 47

Re: Comment preview broken, url incorrect

You can see it here:
http://www.sprt.nl/index.php?id=78

The source says: <form method=“post” action=“id=78#cpreview” id=“txpCommentInputForm”> instead of <form method=“post” action=“index.php?id=78#cpreview” id=“txpCommentInputForm”>

Offline

#12 2007-07-09 02:17:15

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

Re: Comment preview broken, url incorrect

Actually, this problem makes perfect sense: you’re still using v.4.0.3, and the IIS checks have changed since then:

Note that the argv thing still appears to be broken.

Upgrading may solve the problem altogether for you. You’ll want to do that anyway, there are several vital security fixes since 4.0.3 as well.

Offline

Board footer

Powered by FluxBB