Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[issue] Submitting comments redirects to malformed URL
I’ve been attempting to add comments functionality to my existing TXP installation without success.
When I preview a comment, then submit it, the comment ends up in the database, but the browser gets directed to a very strange URL such as “http://stoneship.orghttp//stoneship.org/?id=11&commented=0#txpCommentInputForm” — I’m assuming TXP wants to redirect to “http://stoneship.org/?id=11&commented=0#txpCommentInputForm” but somehow the : (colon) vanishes.
I’ve been browsing the wiki, the forum, and the FAQ, but there’s nothing relevant I can find.
I’m using lighttpd and clean-urls by setting TXP’s index.php as 404 handler. It seems like lighttpd isn’t supported well, so maybe that’s related? I’m also using the gbp_permanent_links plugin — considering it rewrites URLs, this might be the culprit as well…
Thanks for any help in advance.
Last edited by ddfreyne (2006-11-26 14:27:30)
Offline
#2 2006-11-26 23:37:56
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: [issue] Submitting comments redirects to malformed URL
404 handler clean URLs are experimental. Sometimes they break.
Alex
Offline
Re: [issue] Submitting comments redirects to malformed URL
I’ll try to look into that. Can you provide a link to a page wuth a comment form that exhibits that behaviour?
Offline
Re: [issue] Submitting comments redirects to malformed URL
I’ve set up a test page at stoneship.org/preview. Fill in the form, press preview, press submit, and be redirected to a broken URL.
Comments are not moderated, so they will appear on the site after submitting. After ending up at the broken URL, go to stoneship.org/preview again and it’ll be visible.
(When pressing the back button after ending up at the malformed URL, and submitting again, things seem to break even more, since comments aren’t submitted at all anymore—but I believe this is a browser issue.)
Offline
Re: [issue] Submitting comments redirects to malformed URL
As a temporary measure, you can comment the following line in textpattern/publish/comment.php
$backpage = preg_replace("#(https?://[^/]+)/.*$#","$1",hu).$backpage;
Put a double-slash //
in front of it.
We’ll clean that up for the next release and add a fix for experimental clean urls via 404 as well. Thanks for the report.
Offline
Re: [issue] Submitting comments redirects to malformed URL
I seem to be having a similar problem with my comments.
When I submit it goes to a URL with #cpreview appended, which is a 404 page.
You can test it here here
I’ve tried this commenting this line out of textpattern/publish/comment.php
$backpage = preg_replace(“#(https?://[^/]+)/.*$#”,”$1”,hu).$backpage;
to no avail.
Any tips on what I should try next?
Thanks
Offline
#7 2007-01-21 20:59:14
- jimpoep
- Member
- Registered: 2006-02-19
- Posts: 33
Re: [issue] Submitting comments redirects to malformed URL
Tried it too, doesn’t work. Why is the commenting thing so stupid?! (sorry, just frustrated)…
Offline