TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 175
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 183
  • Total: 183

"Read More" URL has extra "/" in the URL

Started by Rostam, January 19, 2009, 08:23:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rostam

I am displaying the recent posts on the home page. At the bottom of some of the blocks you see "Read More" which is pointing to the actual post in the forum. The URL has an extra slash "/" before the post name which makes the URL invalid. I.E http://www.mydomain.com/forum//topic.html I looked in the code. This is coming from the following code in the TPmodules.php
$row['body'] .= '...... <a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '".0>' . $txt['tp-readmore'] . '</a>';

So it looks like "ID_TOPIC" has an extra / at the beginning?   How can I fix this?


PS. I have also SEO4SMF installed and turned on pretty URL. Could that have anything to do with this?

G6Cad

QuotePS. I have also SEO4SMF installed and turned on pretty URL. Could that have anything to do with this?

Yes, it just might  ;)

Please take your time and fill in the needed info according to this.

Please read the Posting Guidelines.html

Rostam

Thanks for the quick reply. Here is the needed information:

Link to my site: http://www.brostalk.com
SMF version: SMF ver. 1.1.7
TP version: TP ver. 1.0.6
Theme name and version: Megapolis
Mods installed: SEO4SMF, Time-Logged-in, Super Admin
Related Error messages: No Error message. But the "Read More" link at the bottom of recent posts doesnt work, because it has an extra slash "/".

G6Cad

What happends if you turn off the SEO and Search friendly url ?

Rostam

I just tried it out and this is what happen:

With SEO & Friendly URL: http://www.brostalk.com/forum//fast_sex-t68.0.html;  (Doesnt work)
Without SEO: http://www.brostalk.com/forum/index.php/topic,68.html  (Works)
Without Friendly URL: http://www.brostalk.com/forum/index.php?topic=68 (Works)

So when both are turned on (default) it doesnt work. I would like to keep them both so SE come by often to index my site.
Any idea how I can fix this?

G6Cad

Will have to leave that question for Bloc or IchBin to answer, i know Bloc is working on using it for this site, so it would not be impossible, jut cant say how to make it happend though.

Rostam

Thanks for your help.
I will wait on Bloc or IchBin to see if they have a solution for this issue.

Rostam

Hi Bloc and IchBin,
Have you had a chance to take a look into this issue? Thanks in advance.

IchBin

It is a friendly URL issue. I'm not sure what is causing it. I thought I remembered someone having this problem before, but I can't find the post here.

Rostam

Thanks for the prompt reply. Since this is coming from below line of code:
$row['body'] .= '...... <a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '".0>' . $txt['tp-readmore'] . '[/url]';

Is there a way to change ID_TOPIC? IE. remove the extra "/" Sorry I am not a php expert. Your help is appreciated.

This website is proudly hosted on Crocweb Cloud Website Hosting.