"Mark all topics Read" -BUG

Support for IntegraMOD 140

Moderator: Integra Moderator

"Mark all topics Read" -BUG

PostAuthor: bbalegere » Tue May 09, 2006 1:27 am

I get this error when I click on Mark all topics Read
Check it out here
http://www.bbalegere.ahbhost.com/forum/
General Error

Could not access topics

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND forum_id = 5 AND topic_moved_id = 0' at line 3

SELECT topic_id FROM integra_topics WHERE topic_id IN () AND forum_id = 5 AND topic_moved_id = 0

Line : 373
File : viewforum.php
Last edited by bbalegere on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

bbalegere
Newbie
Newbie
 
Posts: 26
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 26, 2006 10:22 pm
Cash on hand: 0.00

PostAuthor: Eon » Tue May 09, 2006 5:56 am

Well that is not a bug as no one else has it. Looks like you have an sql error of some sort. Or it is trying to move a topic from forum id #5. Have you checked in phpmyadmin to see what forum has ID # 5?

I see that your site is still new and not live yet. My first suggestion would be to do a new install.

Make sure you clean your sql tables out before hand.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

Re: "Mark all topics Read" -BUG

PostAuthor: Dragonsys » Tue May 09, 2006 7:01 am

Have you installed any extra MODs recently? it doesn't look like you did, but it never hurts to ask <img>
Last edited by Dragonsys on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Image
User avatar
Dragonsys
Sr Integra Member
Sr Integra Member
 
Posts: 326
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

PostAuthor: bbalegere » Tue May 09, 2006 7:07 am

I have not installed any extra mods.
I found the same bug in this site
http://integrmod.com/IntegraMOD_140_demo/ ... um.php?f=1
I think this is a sample site where we can check out all the themes.
In the link I have posted above,just Click on Mark all topics read

You will get an error message which is similar to the error I am getting.

Could not access topics

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ') AND forum_id = 1 AND topic_moved_id = 0' at line 3

SELECT topic_id FROM phpbb_topics WHERE topic_id IN () AND forum_id = 1 AND topic_moved_id = 0

Line : 373
File : viewforum.php


If you want to see the error directly, click on this link
http://integrmod.com/IntegraMOD_140_demo/ ... ark=topics
Last edited by bbalegere on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

bbalegere
Newbie
Newbie
 
Posts: 26
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 26, 2006 10:22 pm
Cash on hand: 0.00

PostAuthor: Eon » Tue May 09, 2006 12:23 pm

Hmm. Are there any topics to acutally be marked as read??? Cause you know it usually doesn't give you that link unless you are logged in and have a history of what has and has not been seen.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: bbalegere » Wed May 10, 2006 5:07 am

Whatever it is,the error is not present only in my site,it is present in the IntegraMOD sample site also.
I hope someone knows how to fix this.
Last edited by bbalegere on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

bbalegere
Newbie
Newbie
 
Posts: 26
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 26, 2006 10:22 pm
Cash on hand: 0.00

PostAuthor: Eon » Wed May 10, 2006 6:10 am

Well like I said that link is not actually available if there are no unread topics to mark. So therefore I would think you would get an error.

If you are using just a link to this mark all topics link, like a favorite then I could see this happening. But when there are topics to actually be marked read does it give you this error?

I signed up at your forum. Make a post so I can see an unread topic and get the error myself.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: bbalegere » Wed May 10, 2006 8:31 am

I replied to thetopic.
Check the Mark as read now.
Last edited by bbalegere on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

bbalegere
Newbie
Newbie
 
Posts: 26
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 26, 2006 10:22 pm
Cash on hand: 0.00

Re: "Mark all topics Read" -BUG

PostAuthor: Dragonsys » Wed May 10, 2006 9:13 am

I get the same error on my site, but it does not happen all the time...
and it only happens, when viewing a certain forum.
Last edited by Dragonsys on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Image
User avatar
Dragonsys
Sr Integra Member
Sr Integra Member
 
Posts: 326
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

PostAuthor: Eon » Wed May 10, 2006 1:50 pm

I clicked on mark topics read inside the forum, and it worked perfectly.

make another post and I will click on the mark forums read button and check it.

Was it a specific forum that you had a new post in that it was doing that? If so, make a topic there.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: BurninFingerTipz » Wed May 10, 2006 7:25 pm

I will add, I also get this error aswell when I "Mark all threads read"

General Error

Could not access topics

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ') AND forum_id = 3 AND topic_moved_id = 0' at line 3

SELECT topic_id FROM phpbb_topics WHERE topic_id IN () AND forum_id = 3 AND topic_moved_id = 0

Line : 373
File : viewforum.php
Last edited by BurninFingerTipz on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

BurninFingerTipz
Members
Members
 
Posts: 55
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 09, 2006 6:49 pm
Cash on hand: 0.00
Location: Ohio, USA

PostAuthor: bbalegere » Wed May 10, 2006 9:29 pm

OK I got it
The error is shown only if all the topics are already read.
It works perfectly fine if there are topics which are not read.
However I do not want that error to come.
Is there any fix?
Last edited by bbalegere on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

bbalegere
Newbie
Newbie
 
Posts: 26
Likes: 0 post
Liked in: 0 post
Joined: Wed Apr 26, 2006 10:22 pm
Cash on hand: 0.00

PostAuthor: Eon » Thu May 11, 2006 5:46 am

Well the link will not be there when there are no unread topics.

So therefore you will not get this error.

Why do you guys save a link to mark all topics read?

That seems pointless. But hey that is just my opinion.
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

Re: "Mark all topics Read" -BUG

PostAuthor: Nogami » Tue May 16, 2006 11:43 pm

I could be wrong because my PHP skills are kind of weak, but isn't this just a formatting problem with the SQL statement?

Code: Select all
   $sql = "SELECT topic_idFROM " . TOPICS_TABLE . "WHERE topic_id IN ($s_topics)AND forum_id = $forum_idAND topic_moved_id = 0";  


Shouldn't it lose the brackets around $s_topics to read]    $sql = "SELECT topic_idFROM " . TOPICS_TABLE . "WHERE topic_id IN $s_topicsAND forum_id = $forum_idAND topic_moved_id = 0";  [/code]

Alternately, add a check so that if the $s_topics variable is empty, just exit with a message "No unread topics?"

Apologies if I'm wrong <img>
Last edited by Nogami on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Nogami
Newbie
Newbie
 
Posts: 7
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 16, 2006 11:35 am
Cash on hand: 0.00

PostAuthor: Dragonsys » Wed May 17, 2006 4:55 am

"Eon";p="5484" wrote:Well the link will not be there when there are no unread topics.

So therefore you will not get this error.

Why do you guys save a link to mark all topics read?

That seems pointless. But hey that is just my opinion.


Normally that is true. However, when there are unread topics in ANY forum the link shows, even when viewing a forum which does not have any unread topics. If you click on the link while viewint the forum with no unread topics, you will get this error.

It's not that we have a link saved to Mark all topics read.
Last edited by Dragonsys on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Image
User avatar
Dragonsys
Sr Integra Member
Sr Integra Member
 
Posts: 326
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

Re: "Mark all topics Read" -BUG

PostAuthor: Nogami » Thu May 18, 2006 2:09 pm

Ok, this fixed it on my system:

in: viewforum.php

Find:

Code: Select all
   // read the relevant topic ids         $sql = "SELECT topic_id                     FROM " . TOPICS_TABLE . "  


Before, Add]             if ( $s_topics == '' )         {             message_die(GENERAL_MESSAGE, 'No unread topics in this forum');         }  [/code]

Of course, you can edit this to be in your language of choice <img>

Dave
Last edited by Nogami on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Nogami
Newbie
Newbie
 
Posts: 7
Likes: 0 post
Liked in: 0 post
Joined: Sun Apr 16, 2006 11:35 am
Cash on hand: 0.00


Return to IntegraMOD 140

Who is online

Registered users: App360MonitorBot, Bing [Bot], Google [Bot]