Jump to content

Download: (SOS31) Recent Topics


Adriano Faria

Recommended Posts

Posted

Hi
since upgrading to the latest version 2.1.2 i have a lot of sql errors showing in my logs, any idea what would be causing the errors.
i am using IPB 3.1.4
thank you

Date: Sat, 30 Apr 2011 00:00:25 +0000

 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 '-1' at line 2

 IP Address: 90.###.###.### - /index.php?app=forums&module=ajax&section=recentTopics&secure_key=277d8923cbc01bc7337f716bb6af0f30

 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 mySQL query error: SELECT t.*,m1.members_seo_name as nome1, m1.member_group_id as grupo1,m2.members_seo_name as nome2, m2.member_group_id as grupo2 FROM ibf_topics t  LEFT JOIN ibf_members m1 ON ( m1.member_id=t.starter_id ) 

 LEFT JOIN ibf_members m2 ON ( m2.member_id=t.last_poster_id )   WHERE t.approved = 1 and t.forum_id in(31,32,33,35,36,48,34,5,42,6,2,52,4,58,40,60,38,7,8,41,17,9,10,16,18,12,63,49,43,44,45,47,46,39,30,59,62,51,50,57,14,54,56,15,68,69) and t.forum_id NOT in(14,21,7,8,41,39,30,59,17,31,32,33,35,36,48,34,10,24,18,12,26,61,13,64,11)and t.state != "link" ORDER BY t.last_post desc LIMIT 0,-1

 .--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.

 | File                                                                       | Function                                                                      | Line No.          |

 |----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------|

 | boss_cp/applications/forums/modules_public/ajax/recentTopics.php           | [public_forums_ajax_recentTopics].recentTopics                                | 29                |

 '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------'

 | boss_cp/sources/base/ipsController.php                                     | [public_forums_ajax_recentTopics].doExecute                                   | 406               |

 '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------'

 | boss_cp/sources/base/ipsController.php                                     | [ipsAjaxCommand].execute       

  • Replies 149
  • Created
  • Last Reply
Posted

LIMIT 0,-1

Take a look in you Control Panel -> Forums -> Recent Topics. See what shows in number of topics to show. And see what shows in this hook settings in Admin CP. Then open admin\applications\forums\modules_public\ajax\recentTopics.php and see if those lines below exists in this file:

		$userqtd = $this->memberData['recenttopics_qtd'] == '-1' ? $this->settings['topicosrecentes_nr'] : $this->memberData['recenttopics_qtd'];


		$qtd = $this->memberData['member_id'] ? $userqtd : $this->settings['topicosrecentes_nr'];

More below:

							'limit'   	=> array(0,$qtd),


If not, then you updated the hook file (XML) and didn't reuploaded the JS and PHP file.

Posted

LIMIT 0,-1

Take a look in you Control Panel -> Forums -> Recent Topics. See what shows in number of topics to show. And see what shows in this hook settings in Admin CP. Then open admin\applications\forums\modules_public\ajax\recentTopics.php and see if those lines below exists in this file:

		$userqtd = $this->memberData['recenttopics_qtd'] == '-1' ? $this->settings['topicosrecentes_nr'] : $this->memberData['recenttopics_qtd'];


		$qtd = $this->memberData['member_id'] ? $userqtd : $this->settings['topicosrecentes_nr'];

More below:

							'limit'   	=> array(0,$qtd),


If not, then you updated the hook file (XML) and didn't reuploaded the JS and PHP file.



Hi

i checked and they do contain those lines in the recentTopics.php
just to be certain i uninstalled the hook, reuploaded the files and reinstalled and re setup all the settings.

still producing the same error though, also the recent topics no longer update/refresh

strange as its been working perfectly up to that update.

Thanks for your prompt reply. appreciated
Posted

just been trying the hook on my test board and had the same sql errors, disabled all other hooks to make sure non was conflicting.

this is what appears to be causing the error.

i have set in my acp hook settings to show 4 topics, if i go to members user cp the setting is shown as "use default value"
if i just click save in the members users cp it then changes the default value to "4"
The errors then don't appear any more for that member.

The errors will obviously continue as that only solves the problem for one member.

any idea how to resolve this problem

thank you

Posted

i have set in my acp hook settings to show 4 topics, if i go to members user cp the setting is shown as "use default value"


if i just click save in the members users cp it then changes the default value to "4"


The errors then don't appear any more for that member.



The errors will obviously continue as that only solves the problem for one member.


I'll try to reprodute the error with those steps... will let you know asap.
Posted

Guess it will be another of those weird issues!

My live board: http://forum.sosinvision.com.br/

My user settings:

%7Boption%7D

Confirmation on database:

%7Boption%7D

Admin CP settings:

%7Boption%7D


My board running:

%7Boption%7D

Everything is fine BUT I found in some errors logs:

----------------------------------------------------------------------------------------


Date: Mon, 28 Mar 2011 11:36:36 +0000


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 '-1' at line 2


IP Address: XXX.XXX.XXX.XXX- /


----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


mySQL query error: SELECT t.*,m1.members_seo_name as nome1, m1.member_group_id as grupo1,m2.members_seo_name as nome2, m2.member_group_id as grupo2 FROM ibf_topics t LEFT JOIN ibf_members m1 ON ( m1.member_id=t.starter_id )


LEFT JOIN ibf_members m2 ON ( m2.member_id=t.last_poster_id ) WHERE t.approved = 1 and t.forum_id in(76,3,5,65,87,48,132,17,18,40,128,37,38,49,51,52,511,111,108,123,103,121,513,101,98,99,515,100,105,74,36,78,88,93,94,95,89,90,91,92,106,104,109,71,112,122,124,126,133,125,68,53,134,512,514) and t.forum_id NOT in(5,65,107,19) ORDER BY t.last_post desc LIMIT 0,-1


Ok. Will try to figure out what's happening.
Posted

Just removed that DEFAULT OPTION (-1) and hook will set 5 as default # of topics to show, just like happens on Admin CP:

%7Boption%7D

Plus, also noticed that this issue was happening because of that default option.

Hey bearback, let me know if you're available to test version 2.1.3 before I release it here. I'll send it via PM if you can test it.

Posted

Thank you for your time, bearback.


What's New in Version 2.1.3:


  • Fixed the bug in User Control Panel setting to use the default number of topics, which was 'causing Driver Error.


this mods such an improvement on the original
thank you once again for all your time,
cheers
  • 3 weeks later...
Posted

Neglect you ? This is the most amazing feature of this hook. It's not interesting for me and for 99,9% of others users to disabled the auto update.

Since I don't support changes in my work, you just need to remove the .js call in templates or send a PM for a custom job.

I won't create a setting for this.

Posted

Neglect you ? This is the most amazing feature of this hook. It's not interesting for me and for 99,9% of others users to disabled the auto update.



Since I don't support changes in my work, you just need to remove the .js call in templates or send a PM for a custom job.



I won't create a setting for this.




In big boards, those updates are really a problem. If you think %99.9 of users are the small forum owners, than this may be the problem. Ajax updates are resource hogs. And yet there's no better recent topics mod other than yours. Without auto-updates, its still the best. I gladly pay for this but for every update, i'll have to contact with you and get an update. Is it ok for you to make this option baseline if I pay?


you can set a very very long time for refresh




It still makes a query when the page loads. And it's enough to increase my query times to 5 seconds.
  • 1 month later...
Posted

is there a way i can pin a specific topic to the top of the list? i know it's not an option but maybe someone can help me make this happen?
thanks for any help.

  • 2 weeks later...
Posted

Feature request. When watching a forum on 3.2, each topic has an downward pointing arrow. When clicking on it you got a preview of the first and the last post. This would really be awesome. Do you have a donation address for support?

Best regards.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...