Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 07:40 pm EST
Geeklog Forums
Comment submission issue
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
On one of my geeklog 1.8.1 site when users submit comments the page display the message "An SQL error has occurred."
Log file is
I can't reproduce it on demo site. What can I do to avoid this error
From lib-comment.php near line 1217
//null goes into cid, comment not published yet, set moderation queue id
DB_save($_TABLES['commentnotifications'], 'uid,deletehash,mid',"$uid,'$deletehash',$cid");
$cid seems to be null in this case.
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
Log file is
Text Formatted Code
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 ')' at line 1. SQL in question: REPLACE INTO gl_commentnotifications (uid,deletehash,mid) VALUES (39,'50dee73dc953c0283b320bc0e57b0c4f',) I can't reproduce it on demo site. What can I do to avoid this error
From lib-comment.php near line 1217
Text Formatted Code
//null goes into cid, comment not published yet, set moderation queue id
DB_save($_TABLES['commentnotifications'], 'uid,deletehash,mid',"$uid,'$deletehash',$cid");
$cid seems to be null in this case.
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
19
7
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Certainly. I solved my issue by adding $cid = 0
// save user notification information
if (isset($_POST['notify']) && ($ret == -1 || $ret == 0) ) {
$deletehash = md5($title . $cid . $comment . rand());
if ($ret == -1) {
//null goes into cid, comment not published yet, set moderation queue id
$cid = 0; // comment went into the submission queue
DB_save($_TABLES['commentnotifications'], 'uid,deletehash,mid',"$uid,'$deletehash',$cid");
} else {
DB_save($_TABLES['commentnotifications'], 'cid,uid,deletehash',"$cid,$uid,'$deletehash'");
}
}
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
Text Formatted Code
// save user notification information
if (isset($_POST['notify']) && ($ret == -1 || $ret == 0) ) {
$deletehash = md5($title . $cid . $comment . rand());
if ($ret == -1) {
//null goes into cid, comment not published yet, set moderation queue id
$cid = 0; // comment went into the submission queue
DB_save($_TABLES['commentnotifications'], 'uid,deletehash,mid',"$uid,'$deletehash',$cid");
} else {
DB_save($_TABLES['commentnotifications'], 'cid,uid,deletehash',"$cid,$uid,'$deletehash'");
}
}
Ben
I'm available to customise your themes or plugins for your Geeklog CMS
15
9
Quote
All times are EST. The time is now 07:40 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content