Recent

Author Topic: Trouble with internal links within the forum  (Read 7148 times)

ChrisF

  • Hero Member
  • *****
  • Posts: 542
Trouble with internal links within the forum
« on: July 31, 2013, 11:43:55 pm »
Since a few time, I've noticed that sometimes, an additional "...PHPSESSID=[hexvalue]..." is added inside internal links to other part of the forum (links to other topics, to other posts, and so on...).

For instance, a sample caught today (when reading a recent post):

Intended link to the concerned topic:
Code: [Select]
http://forum.lazarus.freepascal.org/index.php/topic,21178.0.html

"Real" link obtained within my browser:
Code: [Select]
http://forum.lazarus.freepascal.org/index.php?PHPSESSID=15981e0efefd6a26b6e6f31460e1b0db&/topic,21178.0.html
Please, note the additional "...?PHPSESSID=15981e0efefd6a26b6e6f31460e1b0db&..."

Of course, the "real" link in the browser (Firefox in my case) is unknown and leads to the home page (i.e. http://forum.lazarus.freepascal.org/index.php ).

As far as I can tell (but I've done very few tests), it mostly (only ?) occurs when the forum is consulted as a guest user (i.e. without being connected).

Am I the only one to have encountered this problem ?

Any explanations ?

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: Trouble with internal links within the forum
« Reply #1 on: July 31, 2013, 11:54:18 pm »
I am registered from 2009, I used Windows Vista for a while (with IE, Firefox or Chrome) and I am on Linux + Opera last three years (always logged in) and I never saw this kind of problem.
Lazarus 2.1.0 r61214:62238 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

ChrisF

  • Hero Member
  • *****
  • Posts: 542
Re: Trouble with internal links within the forum
« Reply #2 on: August 01, 2013, 02:49:08 pm »
Oh, I'm afraid it's not only my imagination.

For instance, here is a screen capture with the concerned bug (captured today). I was looking at this topic, as a guest user, and my cursor was over the "http://forum.lazarus.freepascal.org/index.php" link (present in my former post).

As you clearly can see at the left bottom of the capture, the link that my browser would be using includes this additional part in the built URL.

As soon as I was connected, the problem disappeared.

I'm almost sure it's related to guest users. I remember I've written a post in the past (with an internal link inside the forum). Then I disconnected from the forum, read my post (as a guest user), click on the link and noticed and I was not obtaining the correct concerned target post. So I re-connected again (thinking I've put a wrong link), edited my post, for finally seeing that my link was quite OK.

That's why I'm saying it's probably occurring only when reading the forum as a guest user.

My configuration is just an "ordinary" one : Windows XP (32 bits - SP3) + Firefox (currently version 22.0).

But I'll give a try with  another browser, and another windows version. Though it's sometimes a bit difficult to reproduced the problem; as already spotted, it's not occurring all the times.

ChrisF

  • Hero Member
  • *****
  • Posts: 542
Re: Trouble with internal links within the forum
« Reply #3 on: August 01, 2013, 04:06:30 pm »
After a few more tests, the problem is also present with:
-IE 8 (Windows XP 32 bits)
-IE 10 (Windows 7 64 bits)
-Firefox 22 (Windows 7 64 bits)

As I suspected, the problem is relative to the new portal for Lazarus (which is quite great , BTW). If the forum is reached directly, this does not occur.


Way to reproduce the problem:

1/ Open your browser

2/ Clear all your history data (cache, cookies, ...). This is absolutely mandatory for this test.

3/ Go then directly to the Lazarus home page: http://www.lazarus.freepascal.org/ . This is also mandatory. (Remark: you must read the forum as a guest, without being logged).

4/ Click on the forum link. As seen in the attached capture (see capture2.png), you should now have a "PHPSESSID" data add for the forum link (but not for the other URLs).

5/ Choose a topic in the forum: using the last posts part (i.e. at the right of the web page), or just by browsing and selecting any topic inside the forum.

6/ Try to find a topic with an internal link (i.e. a link to another topic or another post in this forum) inside a post. For instance this topic (I'm adding such a link at the end of this post, for test purposes). Click on it. Another window or another tab should open. It should be the targeted post or topic; but instead, it's the home page of the forum, because the URL is invalid.


Additional remarks:

-as indicated before, if you reach the forum directly, this does not occur:
. http://www.lazarus.freepascal.org/ , then forum,   ===>  Possible problem
. http://forum.lazarus.freepascal.org/index.php    ===>   No problem
. http://forum.lazarus.freepascal.org/index.php?action=forum    ===>   No problem

-when logged in the forum, the PHPSESSID data (it's a cookie, as far as I can see) seem to be cleared, and so the problem is no more present.

-when browsing the forum topics (possible problem case), the links are OK because the PHPSESSID data are added at the very end of the URL. Sample (OK):
Code: [Select]
http://forum.lazarus.freepascal.org/index.php/topic,21660.0.html?PHPSESSID=c566eb142895ea270a97dfab8af8ed63
-but when an internal link inside a post is used, the PHPSESSID data are inserted into the URL, and that's why the obtained URL is invalid. Sample (wrong URL):
Code: [Select]
http://forum.lazarus.freepascal.org/index.php?PHPSESSID=c566eb142895ea270a97dfab8af8ed63&/topic,20511.0.html
While it should be:
Code: [Select]
http://forum.lazarus.freepascal.org/index.php/topic,20511.0.html
or eventually
Code: [Select]
http://forum.lazarus.freepascal.org/index.php/topic,20511.0.html?PHPSESSID=c566eb142895ea270a97dfab8af8ed63

Test URL (see "Way to reproduce the problem", step 6): http://forum.lazarus.freepascal.org/index.php/topic,21660.0.html

User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: Trouble with internal links within the forum
« Reply #4 on: August 01, 2013, 05:45:46 pm »
You're right, i can reproduce the PHPSESSID= on links using Firefox or IE. It only shows http://forum.lazarus.freepascal.org/index.php?action=forum on Chrome though.

ChrisF

  • Hero Member
  • *****
  • Posts: 542
Re: Trouble with internal links within the forum
« Reply #5 on: August 01, 2013, 07:47:38 pm »
Thanks for your tests and confirmation.

Apparently this cookie is set both within the lazarus home page and  the forum page, though the problem occurs only in the first case. I don't know why.

Lazarus Home page:
Code: [Select]
http://www.lazarus.freepascal.org/

GET / HTTP/1.1
Host: www.lazarus.freepascal.org
...

HTTP/1.1 200 OK
Date: Thu, 01 Aug 2013 17:35:00 GMT
Server: Apache/2.2.9 (FreeBSD) mod_ssl/2.2.9 OpenSSL/0.9.8e DAV/2 PHP/5.2.8 with Suhosin-Patch
X-Powered-By: PHP/5.2.8
Set-Cookie: PHPSESSID=ce2add975ad9f33d077a631e7cca588e; path=/
...

Forum
Code: [Select]
http://forum.lazarus.freepascal.org/index.php?action=forum

GET /index.php?action=forum HTTP/1.1
Host: forum.lazarus.freepascal.org
...

HTTP/1.1 200 OK
Date: Thu, 01 Aug 2013 17:37:32 GMT
Server: Apache/2.2.9 (FreeBSD) mod_ssl/2.2.9 OpenSSL/0.9.8e DAV/2 PHP/5.2.8 with Suhosin-Patch
X-Powered-By: PHP/5.2.8
Set-Cookie: PHPSESSID=07ab56a25b95795e5df14b6bd12f62b1; path=/
...


Could anybody tell me who is/are the author/authors of the new Lazarus home page (I must admit I've not really read the recent discussion about this project) ?

I'd like to ask him his opinion about this problem; and if it's really related to the related recent change.

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: Trouble with internal links within the forum
« Reply #6 on: August 01, 2013, 08:16:29 pm »
Lazarus 2.1.0 r61214:62238 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

ChrisF

  • Hero Member
  • *****
  • Posts: 542
Re: Trouble with internal links within the forum
« Reply #7 on: August 01, 2013, 09:58:26 pm »
Thank you.

I'm going to try to get in touch with him.