Support Forum
Hi-
I am getting the 'Invalid Database Query' pop-up on every click of a topic/post. I have changed wp and sp themes, disabled wp and sp plug-ins - and it still persists. Not all users are getting it - just me and another that I am aware- we both happen to be moderators - although when I remove me from being a moderator, the pop-up still occurs. Below is the error that is logged.
Any thoughts?
Thank you
-Rick
February 10, 2017 5:27 pm | spaErrError | 279 | database
file: /usr/share/nginx/html/wp-content/plugins/simple-press/forum/content/classes/sp-list-topic-class.php line: 362 function: select error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '37426,37424,37420,37418) ORDER BY topic_id, post_id' at line 2
SELECT wp_sfposts.topic_id, wp_sfposts.post_id, post_index, DATE_ADD(post_date, INTERVAL 5 HOUR) as post_date, guest_name, wp_sfposts.user_id, display_name, (post_count-(post_index-1)) AS new_post_count FROM wp_sfposts JOIN wp_sftopics ON wp_sfposts.topic_id = wp_sftopics.topic_id LEFT JOIN wp_sfmembers ON wp_sfmembers.user_id = wp_sfposts.user_id WHERE wp_sfposts.post_id IN (37484,37482,37480,37471,37463,37462,37454,37447,,37426,37424,37420,37418) ORDER BY topic_id, post_id |
Environment as follows:
Simple:Press |
|
Version: 5.7.3 Build: 14754 Release: Release |
WordPress |
|
Version: 4.7.2 Language: en-US Character Set: UTF-8 Theme: Kleo Child |
PHP |
|
Version: 7.0.15 Memory: 256M |
MySQL |
|
Version: 10.0.29 (MariaDB) |
Server |
|
Version: nginx/1.10.2 |
WP Plugins |
|
Advanced Ads (1.7.17) Advanced Ads – Responsive Ads (1.4.2) All-in-One Event Calendar by Time.ly (2.5.16) Data Tables Generator by Supsystic (1.5.4) K Elements (4.1.7) Mailgun (1.5.8.1) Simple:Press (5.7.3) Slider Revolution (5.3.1.5) Stop User Enumeration (1.3.8) WPBakery Visual Composer (5.0.1) WP Embed Facebook (2.1.7)
|
SP Plugins |
|
Announce (1.0.7) Editor TinyMCE Rich Text (3.3.4) File Uploader with Plupload (4.6) Font Resizer (1.2.1) Maintenance Mode (1.0.4) Private Message System (2.4.1) Profile Display Control (1.0.6) Reputation System (1.1.2) Template Tags and Widgets (1.4.10) Timezone On Registration (1.0) |
every click of a topic/post
not sure what that means...
the error is obvious... two commas in a row in the query (missing integer)... but not really sure why... says something is wrong with your list of new topics...
perhaps try going to forum - toolbox - housekeeping... and flushing the general cache... and also clean the new posts list...
Visit Cruise Talk Central and Mr Papa's World
Unfortunately, your suggestions did not help. Just to clarify, the pop-up occurs when selecting any post or topic to read - or any button (members, profile, etc). Basically, anything I select in the forum, the pop-up will occur - but only a few of us get the pop-up.
A little background.... I hired a very experienced company to convert our long running SMF forum to Simple-Press. Everything went extremely well. This the only gotcha - they say the error is not from their work. At this point, not interested in finger pointing - I just want to figure out how to stop it....even if it is disabling that pop-up. 🙂 Thanks very much.
Like @mr-papa I can not come up with any theory why there should be an empty element in the listing. And clearly it is going to be difficult to get rid of the bad data. Unless you are able and willing to go into the table using a tool like phpMyAdmjn and remove it manually. Is that going to be possible?
YELLOW
SWORDFISH
|
Yes, possible. I was poking around in phpmyadmin last night- but I really don't know what I am doing in there other than backing up, optimizing and looking at status graphs. :-/
Ive made a backup of the database if you care to take a peek/poke ( Atari PC programming lingo lol)
-Rick
Actually - taking a close look at the data might prove fruitful in diagnosis so the first bit is easy!
You will need to know your WP user_id. Assuming you do now that - there is a forum table called sfmembers (wp_sfmembers). Find the row in that table where the column cell is your user_id. Track along the row to find the column called 'newposts'. Can you copy it and paste it here in a post?
YELLOW
SWORDFISH
|
Sending you a PM. Here is the info requested. Thanks! -rick
a:3:{s:6:"topics";a:17:{i:0;s:4:"5221";i:1;s:4:"5274";i:2;s:4:"5270";i:3;s:4:"5268";i:4;s:4:"5265";i:5;s:4:"5264";i:6;s:4:"5263";i:7;s:4:"5262";i:8;s:4:"5261";i:9;s:4:"5247";i:10;s:4:"5259";i:11;s:4:"5258";i:12;s:4:"5245";i:13;s:4:"5251";i:14;s:4:"5254";i:15;s:4:"5248";i:16;s:4:"5249";}s:6:"forums";a:17:{i:0;s:1:"5";i:1;s:2:"12";i:2;s:2:"22";i:3;s:2:"12";i:4;s:1:"5";i:5;s:2:"21";i:6;s:2:"21";i:7;s:2:"22";i:8;s:2:"20";i:9;s:2:"10";i:10;s:2:"10";i:11;s:1:"5";i:12;s:1:"5";i:13;s:2:"19";i:14;s:2:"35";i:15;s:2:"19";i:16;s:2:"19";}s:4:"post";a:17:{i:0;s:5:"37508";i:1;s:5:"37507";i:2;s:5:"37504";i:3;s:5:"37503";i:4;s:5:"37484";i:5;s:5:"37482";i:6;s:5:"37480";i:7;s:5:"37471";i:8;s:5:"37463";i:9;s:5:"37462";i:10;s:5:"37454";i:11;s:5:"37447";i:12;N;i:13;s:5:"37426";i:14;s:5:"37424";i:15;s:5:"37420";i:16;s:5:"37418";}}
so the problem in there is: i:12;N
N should be something like s:5:”37426″ but a different number than 37426..
so at the top of your forum, in the header area, can you click on the "Mark all topics as read" button and see if that helps?
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)