I found a bug in the Topics module with MySQL5. It didnt show the topics.
Reason was the mysql5 keyword "reads", used as varname in the query.
By that, the query failed and returned 0 rows, so no topics were shown.
Fix:
(line numbers are from PHPNuke7.9.0.3.2e)
---
OPEN FILE: modules/Topics/index.php
FIND: (line 28)
Code:
$sql = "SELECT t.topicid, t.topicimage, t.topictext, count(s.sid) AS stories, SUM(s.counter) AS reads FROM ".$prefix."_topics t LEFT JOIN ".$prefix."_stories s ON (s.topic = t.topicid) GROUP BY t.topicid, t.topicimage, t.topictext ORDER BY t.topictext";
REPLACE WITH:
Code:
$sql = "SELECT t.topicid, t.topicimage, t.topictext, count(s.sid) AS stories, SUM(s.counter) AS thereads FROM ".$prefix."_topics t LEFT JOIN ".$prefix."_stories s ON (s.topic = t.topicid) GROUP BY t.topicid, t.topicimage, t.topictext ORDER BY t.topictext";
_________________ There are 10 kinds of people. Those who understand binary values, and those who dont
---
Sorry for my weird english. Im german, and Im blonde
MarkusHolst Nuke Cadet
Joined: Dec 09, 2008
Posts: 1
Posted:
Tue Dec 09, 2008 12:00 pm
Maybe it is a bit to late to answer a 2 years old message, but I gice it a chance. Your bux fix did help me with my php 8.0, but there is still some problems with the topics module.
When you click on the topic icon, you are supposed to come to a site with just this topic. However, you come to the news site, with all topics in same order as on first side.
If you clikc the topic icon in news module, you come to an empty site with just a search box.
I think this is a bug on news/index.php. It doesnät take the link OK. I i use the link <a....&topic=$topicid>, I come to the news side with all topics on. If I use the link <a ........&new_topic=$topicid> I comer to the empty side with search box.
Do you have any clue what is wrong. I think the new_topic link is more correct then the other, but the site can not find the topic.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum