Welcome to Geeklog, Anonymous Sunday, September 01 2024 @ 01:32 am EDT
Geeklog Forums
EVLIST Error
Page navigation
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
gl 1.5 includes changes to the admin list handling so yeah, you'll miss out on some stuff there. I plan to accommodate those changes once gl 1.5 is released--I certainly won't have time before that. I'll probably just not make use of anything provided by gl on that page and let evList build the admin page...
23
19
Quote
earnest
Anonymous
Hi mach:
I'm getting the error below when anonymous users submit an event to the submissions queue. The event makes it to the queue apparently, but not before crashing the site with a SQL error. The logs say this:
12/12/07 17:55:54 - 1136: Column count doesn't match value count at row 1. SQL in question: INSERT IGNORE INTO gl_evlist_lookup VALUES ( '20071212175554735','2' )
Might you know what is going on?
-E
I'm getting the error below when anonymous users submit an event to the submissions queue. The event makes it to the queue apparently, but not before crashing the site with a SQL error. The logs say this:
12/12/07 17:55:54 - 1136: Column count doesn't match value count at row 1. SQL in question: INSERT IGNORE INTO gl_evlist_lookup VALUES ( '20071212175554735','2' )
Might you know what is going on?
-E
20
24
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
yes, i do actually. Good find.
the lookup table contains 3 columns and the query that is causing your error is submitting only two.
find the following in event.php about line 1582:
$cat_id = COM_applyFilter($cat_id);
if (!empty($cat_id)) {
if (!is_numeric($cat_id) && $_USER['uid'] > 1) {
//anon user cannot add new categories,
//but logged in members may and for now they are not moderated.
//insert new category
DB_query("INSERT INTO {$_TABLES['evlist_categories']} SET name = '$cat_id', status = '0'");
//$newcid = DB_insertID();
$newcid = DB_getItem($_TABLES['evlist_categories'], 'id', "name='$cat_id'");
if (!empty($newcid)) {
$cat_values .= "('{$A['eid']}','$newcid')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
} else {
$cat_values .= "('{$A['eid']}','$cat_id')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
}
$i++;
}
and change it to look like this:
$cat_id = COM_applyFilter($cat_id);
$cat_status = '1';
if (!empty($cat_id)) {
if (!is_numeric($cat_id) && $_USER['uid'] > 1) {
//anon user cannot add new categories,
//but logged in members may and for now they are not moderated.
//insert new category
DB_query("INSERT INTO {$_TABLES['evlist_categories']} SET name = '$cat_id', status = '0'");
//$newcid = DB_insertID();
$newcid = DB_getItem($_TABLES['evlist_categories'], 'id', "name='$cat_id'");
if (!empty($newcid)) {
$cat_values .= "('{$A['eid']}','$newcid','$cat_status')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
} else {
$cat_values .= "('{$A['eid']}','$cat_id','$cat_status')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
}
$i++;
}
note there are three changes to make.
that should do it. sorry for the hassle
the lookup table contains 3 columns and the query that is causing your error is submitting only two.
find the following in event.php about line 1582:
Text Formatted Code
foreach ($A['category'] AS $key => $cat_id) {$cat_id = COM_applyFilter($cat_id);
if (!empty($cat_id)) {
if (!is_numeric($cat_id) && $_USER['uid'] > 1) {
//anon user cannot add new categories,
//but logged in members may and for now they are not moderated.
//insert new category
DB_query("INSERT INTO {$_TABLES['evlist_categories']} SET name = '$cat_id', status = '0'");
//$newcid = DB_insertID();
$newcid = DB_getItem($_TABLES['evlist_categories'], 'id', "name='$cat_id'");
if (!empty($newcid)) {
$cat_values .= "('{$A['eid']}','$newcid')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
} else {
$cat_values .= "('{$A['eid']}','$cat_id')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
}
$i++;
}
Text Formatted Code
foreach ($A['category'] AS $key => $cat_id) {$cat_id = COM_applyFilter($cat_id);
$cat_status = '1';
if (!empty($cat_id)) {
if (!is_numeric($cat_id) && $_USER['uid'] > 1) {
//anon user cannot add new categories,
//but logged in members may and for now they are not moderated.
//insert new category
DB_query("INSERT INTO {$_TABLES['evlist_categories']} SET name = '$cat_id', status = '0'");
//$newcid = DB_insertID();
$newcid = DB_getItem($_TABLES['evlist_categories'], 'id', "name='$cat_id'");
if (!empty($newcid)) {
$cat_values .= "('{$A['eid']}','$newcid','$cat_status')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
} else {
$cat_values .= "('{$A['eid']}','$cat_id','$cat_status')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
}
$i++;
}
that should do it. sorry for the hassle
20
20
Quote
earnest
Anonymous
No hassle at all.
Still get this error:
Thu 13 Dec 2007 12:13:08 EST - 1136: Column count doesn't match value count at row 1. SQL in question: INSERT IGNORE INTO gl_evlist_lookup VALUES ( '20071213121308266','2' )
I suppose I should look through the code and think. Up till now, I have just been mindlessly cutting and pasting because I want to quickly iron out any issues that may exist. Here is the entire "if statement" as I think you intended:
$i = 1;
$cat_values = '';
foreach ($A['category'] AS $key => $cat_id) {
$cat_id = COM_applyFilter($cat_id);
if (!empty($cat_id)) {
if (!is_numeric($cat_id) && $_USER['uid'] > 1) {
//anon user cannot add new categories,
//but logged in members may and for now they are not moderated.
$cat_status = '1';
//insert new category
DB_query("INSERT INTO {$_TABLES['evlist_categories']} SET name = '$cat_id', status = '0'");
//$newcid = DB_insertID();
$newcid = DB_getItem($_TABLES['evlist_categories'], 'id', "name='$cat_id'");
if (!empty($newcid)) {
$cat_values .= "('{$A['eid']}','$newcid','$cat_status')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
} else {
$cat_values .= "('{$A['eid']}','$cat_id')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
}
$i++;
}
//save category info
if (!empty($cat_values)) {
//inserting categories for a new event
DB_query("INSERT IGNORE INTO {$_TABLES['evlist_lookup']} VALUES " . $cat_values);
}
}
if (isset ($_CONF['notification']) && (in_array ('evlist', $_CONF['notification'])
|| in_array('evList', $_CONF['notification']) || in_array('event', $_CONF['notification']))) {
evlist_sendNotification ($A);
}
COM_updateSpeedlimit('event');
$retval .= COM_refresh ($_CONF['site_url'] . '/evlist/index.php?msg=9');
}
Still get this error:
Thu 13 Dec 2007 12:13:08 EST - 1136: Column count doesn't match value count at row 1. SQL in question: INSERT IGNORE INTO gl_evlist_lookup VALUES ( '20071213121308266','2' )
I suppose I should look through the code and think. Up till now, I have just been mindlessly cutting and pasting because I want to quickly iron out any issues that may exist. Here is the entire "if statement" as I think you intended:
Text Formatted Code
if ($cat_count >= 1) {$i = 1;
$cat_values = '';
foreach ($A['category'] AS $key => $cat_id) {
$cat_id = COM_applyFilter($cat_id);
if (!empty($cat_id)) {
if (!is_numeric($cat_id) && $_USER['uid'] > 1) {
//anon user cannot add new categories,
//but logged in members may and for now they are not moderated.
$cat_status = '1';
//insert new category
DB_query("INSERT INTO {$_TABLES['evlist_categories']} SET name = '$cat_id', status = '0'");
//$newcid = DB_insertID();
$newcid = DB_getItem($_TABLES['evlist_categories'], 'id', "name='$cat_id'");
if (!empty($newcid)) {
$cat_values .= "('{$A['eid']}','$newcid','$cat_status')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
} else {
$cat_values .= "('{$A['eid']}','$cat_id')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
}
$i++;
}
//save category info
if (!empty($cat_values)) {
//inserting categories for a new event
DB_query("INSERT IGNORE INTO {$_TABLES['evlist_lookup']} VALUES " . $cat_values);
}
}
if (isset ($_CONF['notification']) && (in_array ('evlist', $_CONF['notification'])
|| in_array('evList', $_CONF['notification']) || in_array('event', $_CONF['notification']))) {
evlist_sendNotification ($A);
}
COM_updateSpeedlimit('event');
$retval .= COM_refresh ($_CONF['site_url'] . '/evlist/index.php?msg=9');
}
23
23
Quote
earnest
Anonymous
Hmmm...
Did you edit the post????
LOL
Hold off for a sec. I will try again.
-E
Did you edit the post????
LOL
Hold off for a sec. I will try again.
-E
16
17
Quote
earnest
Anonymous
Worked!
Thanks!
Thanks!
19
21
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
yes, i did edit the post. i tried to do it quickly.
guess it wasn't quick enough. :wink:
guess it wasn't quick enough. :wink:
19
20
Quote
Status: offline
tt0ne
Forum User
Chatty
Registered: 03/29/04
Posts: 58
This is the weirdest thing ever:
I just installed the plugin - couldn't wait to try it. It installed - no problems.
I try to add an event here is the error:
Mon 31 Dec 2007 15:51:31 PST - 1064: You have an error in your SQL syntax near 'LIKE gl_evlist_events)' at line 2. SQL in question: CREATE TEMPORARY TABLE evlist_temp_events^M
(LIKE gl_evlist_events)
Mon 31 Dec 2007 18:18:45 PST - 1064: You have an error in your SQL syntax near '' at line 1. SQL in question: SELECT anonview FROM
Mon 31 Dec 2007 18:38:10 PST - 1064: You have an error in your SQL syntax near 'SELECT date_format FROM gl_evlist_settings)' at line 1. SQL in question: SELECT format FROM gl_evlist_dateformat WHERE id = (SELECT date_format FROM gl_evlist_settings)
Mon 31 Dec 2007 18:38:13 PST - Error, invalid username: 'Ambrose'
Who is Ambrose? Certainly no username we use THAT IS FOR SURE.
Thanks in advance,
- Marco
HeavenlySanctuary.com - "Surf The Innernet!"
I just installed the plugin - couldn't wait to try it. It installed - no problems.
I try to add an event here is the error:
Text Formatted Code
Mon 31 Dec 2007 15:51:31 PST - 1064: You have an error in your SQL syntax near 'LIKE gl_evlist_events)' at line 2. SQL in question: CREATE TEMPORARY TABLE evlist_temp_events^M
(LIKE gl_evlist_events)
Mon 31 Dec 2007 18:18:45 PST - 1064: You have an error in your SQL syntax near '' at line 1. SQL in question: SELECT anonview FROM
Mon 31 Dec 2007 18:38:10 PST - 1064: You have an error in your SQL syntax near 'SELECT date_format FROM gl_evlist_settings)' at line 1. SQL in question: SELECT format FROM gl_evlist_dateformat WHERE id = (SELECT date_format FROM gl_evlist_settings)
Mon 31 Dec 2007 18:38:13 PST - Error, invalid username: 'Ambrose'
Who is Ambrose? Certainly no username we use THAT IS FOR SURE.
Thanks in advance,
- Marco
HeavenlySanctuary.com - "Surf The Innernet!"
25
17
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
After the initial error, the rest doesn't really make a difference.
The "ambrose" username is what somebody used while trying to log into your site and they were rejected and logged. Notice the time of the entry. No biggy there.
The initial error, the evList error, has something to do with that "^M" -- I have no idea what that is. Maybe a line break or something... It's not in my code.
Ensure that your database user has "create temporary table" permission and maybe that'll fix it--doubtful.
The "ambrose" username is what somebody used while trying to log into your site and they were rejected and logged. Notice the time of the entry. No biggy there.
The initial error, the evList error, has something to do with that "^M" -- I have no idea what that is. Maybe a line break or something... It's not in my code.
Ensure that your database user has "create temporary table" permission and maybe that'll fix it--doubtful.
17
22
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
I guess you could try to get rid of the parenthesis surrounding the LIKE statement. You can find that query in functions.inc near the end of the evlist_makeRecurrences function. In my file it's about line 1496.
If that's the problem tho, you're going to encounter it again. If it is the problem, then perhaps it's a MySQL version issue.
If that's the problem tho, you're going to encounter it again. If it is the problem, then perhaps it's a MySQL version issue.
23
19
Quote
Status: offline
tt0ne
Forum User
Chatty
Registered: 03/29/04
Posts: 58
We are using version 3.23.58 with certain RedHat enhancements... I realize it is an old version but it is maintained and secured still by Redhat. You think there is a syntax problem and I agree with you because obviously other people aren't experiencing this problem. I may upgrade mysql via source - who knows - but I'm disappointed we can't use this plugin without upgrading since I doubt there is anything that it does that requires features from a newer version of MySQL... The user does have "create" privileges so that isn't the problem.
Thank you for creating this plugin - if I upgrade MySQL I'll report if that was the problem (almost certainly - although your plugin is the first to require an upgrade).
Warmly,
- Marco
HeavenlySanctuary.com - "Surf The Innernet!"
Thank you for creating this plugin - if I upgrade MySQL I'll report if that was the problem (almost certainly - although your plugin is the first to require an upgrade).
Warmly,
- Marco
HeavenlySanctuary.com - "Surf The Innernet!"
20
14
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
um, yeah. it does do things (syntax wise) that you cant do in 3.23. Your issue is an example of that... in fact, i think i mentioned earlier that 4.1something is minimum.. can't remember now tho. I have no intention of writing for 3.23 anymore. I've installed 5.x and if it works on that, then I'm happy.
18
20
Quote
Status: offline
tt0ne
Forum User
Chatty
Registered: 03/29/04
Posts: 58
Understood. Like I said, I realize I'm using an old version and you always take a chance of something not working when you haven't upgraded. Maybe you've done me a favor and forced me to finally get around to doing just that- upgrade.
Hopefully I won't run into massive dependency problems. :-)
- Marco
HeavenlySanctuary.com - "Surf The Innernet!"
Hopefully I won't run into massive dependency problems. :-)
- Marco
HeavenlySanctuary.com - "Surf The Innernet!"
18
20
Quote
Status: offline
tt0ne
Forum User
Chatty
Registered: 03/29/04
Posts: 58
Well, I took the fast route, bro - and I simply imported our database into an upgraded mysql server on one of our other machines - and now your plugin works flawlessly. Turns out that having the database on a second machine has also sped up our page rendering time by almost half! I wouldn't have thought a 50% speed increase in page rendering would have happened - but I'm not complaining :-)
Thanks!
- Marco
HeavenlySanctuary.com - "Surf The Innernet!"
Thanks!
- Marco
HeavenlySanctuary.com - "Surf The Innernet!"
23
21
Quote
Page navigation
All times are EDT. The time is now 01:32 am.
- 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