Welcome to Geeklog, Anonymous Thursday, June 19 2025 @ 11:36 pm EDT
Geeklog Forums
What's Related block weirdness
I posted an article on a geeklog site and for some reason, almost the entire article appears as part of the "What's Related" block, so basically you see the real article in the middle and most of the article again in the what's related block. Any ideas on how to fix this behavior so it only shows the story's links?
the article posted (first 2 paragraphs in intro, the rest in the body)
19
22
Quote
Also, that site is running geeklog 1.3.9
14
25
Quote
Status: offline
Forum User
Full Member
Registered: 10/20/03
Posts: 807
Hmm, maybe it's a bug with 'a name'. Could you try removing that and seeing if it fixes it?
18
18
Quote
Status: offline
Forum User
Full Member
Registered: 02/08/04
Posts: 214
Quote by oddly:Any ideas on how to fix this behavior so it only shows the story's links?
In lib-common.php in the function COM_extractLinks, try changing this:
Text Formatted Code
preg_match_all( "/(<a.*?href="(.*?)".*?>)(.*?)(</a>)/i", $fulltext, $matches );to this:
Text Formatted Code
preg_match_all( "/(<a +?href="(.*?)".*?>)(.*?)(</a>)/i", $fulltext, $matches );This will restrict it to matching only spaces between the 'a' and the 'href' which seems to be the problem.
19
16
Quote
Quote by Turias: Hmm, maybe it's a bug with 'a name'. Could you try removing that and seeing if it fixes it?
Yup. Removing the "a name" html tags fixed it immediately.
25
16
Quote
Status: offline
Forum User
Full Member
Registered: 10/20/03
Posts: 807
Yeah, asmaloney's hack will work, but it won't pick up links with attributes between the 'a' and the 'href' (like 'title', 'style', or 'class').
Looks like a bug with 'a' tags that don't hold a 'href' attribute. Wanna file a bug report?
Looks like a bug with 'a' tags that don't hold a 'href' attribute. Wanna file a bug report?

17
23
Quote
Thanks for the patch!! It fixed the problem completely.
17
15
Quote
http://project.geeklog.net/ responds with "The Geeklog Project Site Could Not Connect to Database:" when I try to go there to report this bug.

16
15
Quote
Status: offline
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Quote by oddly: http://project.geeklog.net/ responds with "The Geeklog Project Site Could Not Connect to Database:" when I try to go there to report this bug. 

Keep trying ... The project site is a bit unstable these days. That should be resolved soon, hopefully, when we finally move it to the new server.
bye, Dirk
21
21
Quote
All times are EDT. The time is now 11:36 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content