Sub Menu
Links Menu
Online Users

In total there are 312 users online :: 3 registered, 0 hidden and 309 guests

Most users ever online was 1091 on Wed Aug 16, 2023 5:27 pm

Registered users: Bing [Bot], Google [Bot], Majestic-12 [Bot] based on users active over the past 60 minutes

Calendar Error [Solved]

Support for IntegraMOD 141

Moderator: Integra Moderator

Calendar Error [Solved]

PostAuthor: Drop-Forged » Fri Feb 09, 2007 5:10 pm

Your phpBB Version: 2.0.22
phpBB Type: phpBB / IMPortal
MODs: Yes
Your knowledge: Basic Knowledge
Board URL: http://christiansoldiersgaming.org

PHP Version:
MySQL Version:


What was done before the problem appeared?
Updated from 140


What was done to try to solve the problem?
Nothing yet, not sure where to begin.



De.scription and Message

Here is the error I get when I try to view a date on my sites Calendar:


[align=center:2obfkt7i]Could not obtain topics information

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 '-3, 47' at line 25

SELECT t.*, p.poster_id, p.post_username, p.enable_bbcode, p.enable_html, p.enable_smilies, u.username, pt.post_text, pt.bbcode_uid, lp.poster_id AS lp_poster_id, lu.username AS lp_username, lp.post_username AS lp_post_username, lp.post_time AS lp_post_time FROM phpbb_topics AS t, phpbb_posts AS p, phpbb_posts_text AS pt, phpbb_users AS u, phpbb_posts AS lp, phpbb_users lu WHERE t.forum_id IN (159, 160, 151, 152, 153, 183, 208, 154, 155, 156, 157, 158, 163, 74, 144, 146, 3, 2, 176, 50, 136, 4, 24, 61, 199, 6, 187, 188, 196, 177, 48, 147, 9, 62, 236, 195, 198, 27, 40, 12, 81, 13, 16, 10, 47, 17, 11, 14, 192, 42, 139, 202, 68, 69, 70, 71, 72, 73, 175, 178, 96, 34, 201, 225, 172, 173, 234, 235, 203, 53, 128, 101, 102, 226, 129, 189, 190, 197, 212, 211, 233, 227, 237, 238, 126, 131, 184, 107, 109, 110, 111, 112, 168, 174, 206, 193, 108, 115, 116, 117, 118, 205, 143, 223, 224, 52, 209, 219, 239, 220, 221, 222, 228, 229, 230, 231, 232, 200) AND p.post_id = t.topic_first_post_id AND pt.post_id = t.topic_first_post_id AND u.user_id = p.poster_id AND lp.post_id = t.topic_last_post_id AND lu.user_id = lp.poster_id AND t.topic_calendar_time <1171515600>= 1171429200 AND t.topic_status <> 2 ORDER BY t.topic_calendar_time, t.topic_calendar_duration DESC, t.topic_last_post_id DESC LIMIT -3, 47

Line : 410
File : functions_calendar.php[/align:2obfkt7i]




Some dates it doesnt get the error, not sure why, the error seems to happen even on dates without topics.




Anyone have any ideas??? <img>
Last edited by Drop-Forged on Fri Feb 16, 2007 10:58 am, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 7:07 pm
Cash on hand: 0.00

PostAuthor: Michaelo » Mon Feb 12, 2007 9:16 pm

I cannot find the code that include LIMIT, please check you have the latest version of functions_calendar.php.
If you are unsure post part of the code from line 371 to line 410
Mike
Last edited by Michaelo on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Kiss Portal Engine phpbbireland (status: Released)
User avatar
Michaelo
Administrator
Administrator
 
Posts: 1646
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 5:14 pm
Cash on hand: 0.00
Location: Dublin, Ireland

Re: Calendar Error

PostAuthor: Drop-Forged » Tue Feb 13, 2007 1:09 am

Yes, I double checked, it is the one from the IM 141 package.

Here is the code you asked for:

Code: Select all
     $sql = "SELECT                     t.*,                     p.poster_id, p.post_username, p.enable_bbcode, p.enable_html, p.enable_smilies,                     u.username,                     pt.post_text, pt.bbcode_uid,                     lp.poster_id AS lp_poster_id,                     lu.username AS lp_username,                     lp.post_username AS lp_post_username,                     lp.post_time AS lp_post_time                     $sql_forums_field             FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . POSTS_TEXT_TABLE . " AS pt, " . USERS_TABLE . " AS u, " . POSTS_TABLE . " AS lp, " . USERS_TABLE . " lu $sql_forums_file             WHERE                     t.forum_id IN ($s_forum_ids)                 AND p.post_id   = t.topic_first_post_id                 AND pt.post_id  = t.topic_first_post_id                 AND u.user_id   = p.poster_id                 AND lp.post_id  = t.topic_last_post_id                 AND lu.user_id  = lp.poster_id                 AND t.topic_calendar_time <end_date>= $start_date                 AND t.topic_status <TOPIC_MOVED>sql_query($sql)) )     {         message_die(GENERAL_ERROR, 'Could not obtain topics information', '', __LINE__, __FILE__, $sql);     }       // get the number of occurences     $number = $db->sql_numrows($result);       // if limit per page asked, limit the number of results     if ($limit)     {         $sql .= " LIMIT $start, $max_limit";         if ( !($result = $db->sql_query($sql)) )         {             message_die(GENERAL_ERROR, 'Could not obtain topics information', '', __LINE__, __FILE__, $sql);
Last edited by Drop-Forged on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 7:07 pm
Cash on hand: 0.00

PostAuthor: Michaelo » Tue Feb 13, 2007 2:05 am

Check your events, recurring events and birthdays and see if someone entered a birthday or event using a negative number (-3)...

I have managed to reproduce the error by artificially introducing an error... now I will try find the cause... but I suspect...

After you have check events for incorrect information... try this...

[code]  OPEN]

Now check again and if it works check to see your events are still showing...
Mike
Last edited by Michaelo on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Kiss Portal Engine phpbbireland (status: Released)
User avatar
Michaelo
Administrator
Administrator
 
Posts: 1646
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 5:14 pm
Cash on hand: 0.00
Location: Dublin, Ireland

Re: Calendar Error

PostAuthor: Drop-Forged » Thu Feb 15, 2007 10:06 pm

Sorry for my delayed response.

Unfortunately adding that code doesnt seem to help.

I did check, and I seem to have other negative numbers as well, from what I can see in the topic_poster field.

But I have a really hard time doing much in phpMyAdmin with this DB, it is around 80MB and phpMyAdmin is really slow, and unreliable with it.

Should I replace these negative numbers with positives in my DB, or will that cause other issues???
Last edited by Drop-Forged on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 7:07 pm
Cash on hand: 0.00

PostAuthor: Michaelo » Fri Feb 16, 2007 6:21 am

Don't replace anything... just delete cache... I am not even sure if the function requires positive numbers at this point... However any time you pass it a negative number it generates the error... The code will eliminate ant negative numbers being passed to the function so it's worth a try (after you delete cache ACP -> IM Portal -> delete cache + any other cache)...
Mike
Last edited by Michaelo on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Kiss Portal Engine phpbbireland (status: Released)
User avatar
Michaelo
Administrator
Administrator
 
Posts: 1646
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 5:14 pm
Cash on hand: 0.00
Location: Dublin, Ireland

Re: Calendar Error

PostAuthor: Drop-Forged » Fri Feb 16, 2007 10:57 am

After a few hours of trial and error, I finally got it to workà¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¦ :D
Last edited by Drop-Forged on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[url=http][img=left]http://www.christiansoldiers.com/Sig/sig.png[/img][/url]
[url=http]Free IntegraMod 141 Themes at webhutch.net[/url]

Drop-Forged
Integra Member
Integra Member
 
Posts: 167
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 7:07 pm
Cash on hand: 0.00

PostAuthor: Michaelo » Fri Feb 16, 2007 1:36 pm

No worries :-?
Last edited by Michaelo on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
Kiss Portal Engine phpbbireland (status: Released)
User avatar
Michaelo
Administrator
Administrator
 
Posts: 1646
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 11, 2006 5:14 pm
Cash on hand: 0.00
Location: Dublin, Ireland

Re: Calendar Error [Solved]

PostAuthor: shentrax » Sat Dec 13, 2008 4:39 am

I had to put
Code: Select all
if ($local_start < 0) $local_start = 1;

in both places for it to work, just a fyi.
Code: Select all
// topics$topics_count = 0;$remaining = $board_config['topics_per_page'] - $displayed;$local_start = $start-$displayed;if ($local_start < 0) $local_start = 1;get_event_topics($events, $topics_count, $start_date, $end_date, true, $local_start, $remaining, $fid);// recurring events$remaining = $board_config['topics_per_page'] - $displayed;$local_start = $start-$displayed;if ($local_start < 0) $local_start = 1;get_recurring_events($events, $topics_count, $start_date, $end_date, true, $local_start, $remaining, $fid, true);//// set the page title and include the page header


but it works, thanks.

shentrax
Newbie
Newbie
 
Posts: 22
Likes: 0 post
Liked in: 0 post
Joined: Tue Nov 21, 2006 5:16 am
Cash on hand: 0.00


Return to IntegraMOD 141

Who is online

Registered users: Bing [Bot], Google [Bot], Majestic-12 [Bot]