Welcome to Geeklog, Anonymous Wednesday, January 15 2025 @ 07:59 am EST

Geeklog Forums

Error login after edit user preferences


grf

Anonymous
Geeklog installed on clean mysql 5 one month ago. Some users report to me about they cant login after edit users preferences (hide some blocks, or other options). I try to login with they logins and passwords and get that message on browser:

An SQL error has occurred. Please see error.log for details.

And that message in error.log:

Wed Feb 7 07:52:36 2007 - 1064: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax to us
e near 'Wink OR bid = '-1'Wink ORDER BY blockorder,title asc' at line 1. SQL in questi
on: SELECT name,owner_id,group_id,perm_group,perm_members,perm_anon FROM gl_bloc
ks WHERE onleft = 1 AND is_enabled = 1 AND (tid = 'all' AND type <> 'layout'Wink AN
D (bid NOT IN (13,5,7,12,) OR bid = '-1'Wink ORDER BY blockorder,title asc

How I can fix that problem? All other users login ok.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Yeah, there's something missing from that SQL request. My guess is that it happens when users disable a specific block.

Do you have any blocks that are only visible for anonymous users or only for logged-in users? Something like that ...

Btw, which Geeklog version?

bye, Dirk
 Quote

grf

Anonymous
No, all blocks are visible for all users. Version 1.4.1, last.
Now I cant login from my machine with MY login/password (after trying to login with broked user login), erasing of cookies have no effect. I cant view ever first page of site, just "sql error" Frown
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Could you give us a link to the site? Did you remove any plugins or so? Did you test theme 'professional'?
 Quote

grf

Anonymous
http://www.bscom.ru

Used theme professional, with cosmetic changes.
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Well, I`m helpless. Maybe turn the rootdebug on in config.php?
 Quote

grf

Anonymous
config.php:

rootdebug = true;

browser:

An SQL error has occurred. Please see error.log for details.


error.log:

Wed Feb 7 10:58:06 2007 - 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 'Wink' at line 1. SQL in question: SELECT DISTINCT ft_name FROM gl_access,gl_features WHERE ft_id = acc_ft_id AND acc_grp_id IN ()

Now I can't login from any machine from my network.
 Quote

grf

Anonymous
turn on SEC_VERBOSE in lib-security.php

error.log:

Wed Feb 7 11:10:43 2007 - ****************in getusergroups(uid=1,usergroups=,cur_grp_id=)***************
Wed Feb 7 11:10:43 2007 - got 0 rows
Wed Feb 7 11:10:43 2007 - ****************leaving getusergroups(uid=1)***************
Wed Feb 7 11:10:43 2007 - **********inside SEC_getUserPermissions(grp_id=)**********
Wed Feb 7 11:10:43 2007 - ****************in getusergroups(uid=1,usergroups=,cur_grp_id=)***************
Wed Feb 7 11:10:43 2007 - got 0 rows
Wed Feb 7 11:10:43 2007 - ****************leaving getusergroups(uid=1)***************
Wed Feb 7 11:10:43 2007 - 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 'Wink' at line 1. SQL in question: SELECT DISTINCT ft_name FROM gl_access,gl_features WHERE ft_id = acc_ft_id AND acc_grp_id IN ()
 Quote

grf

Anonymous
I fix problem with login anonymous user by fixig table gl_group_assignments:

insert into gl_group_assignments (ug_main_grp_id, ug_uid) values (2,1);

After that, anonymous users (with uid=1) may login. But when I try to edit Group from admin geeklog inerface and press save button, this table again without record for user uid=1 :-/ I add it again, but how I can edit groups at now?

Problem with broken registered users still present. Try to login, get in error.log:



Wed Feb 7 12:29:40 2007 - SQL in SESS_getUserIdFromSession is:
<BR> SELECT uid FROM gl_sessions WHERE (sess_id = '716433562'Wink AND (start_time > 1170815380) AND (remote_ip = '192.168.100.200'Wink <BR>

Wed Feb 7 12:29:40 2007 - ****Leaving SESS_getUserIdFromSession
Wed Feb 7 12:29:40 2007 - Got 0 as User ID from the session ID
Wed Feb 7 12:29:40 2007 - *************inside new_session*****************
Wed Feb 7 12:29:40 2007 - Args to new_session: userid = 24, remote_ip = 192.168.100.200, lifespan = 0, md5_based = 0
Wed Feb 7 12:29:40 2007 - Attempted to delete rows from session table with following SQL
DELETE FROM gl_sessions WHERE (start_time < 1170815380)

Wed Feb 7 12:29:40 2007 - Got 1 as a result from the query
Wed Feb 7 12:29:40 2007 - Assigned the following session id: 730775100
Wed Feb 7 12:29:40 2007 - *************leaving SESS_newSession*****************
Wed Feb 7 12:29:40 2007 - Setting session cookie: setcookie(gl_session, 730775100, 0, /, .bscom.ru, 0);
Wed Feb 7 12:29:40 2007 - ***Leaving SESS_sessionCheck***
Wed Feb 7 12:29:40 2007 - ****************in getusergroups(uid=24,usergroups=,cur_grp_id=)***************
Wed Feb 7 12:29:40 2007 - got 2 rows
Wed Feb 7 12:29:40 2007 - user is in group Logged-in Users
Wed Feb 7 12:29:40 2007 - user is in group All Users
Wed Feb 7 12:29:40 2007 - ****************leaving getusergroups(uid=24)***************
Wed Feb 7 12:29:40 2007 - **********inside SEC_getUserPermissions(grp_id=)**********
Wed Feb 7 12:29:40 2007 - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version or the right syntax to use near 'Wink OR bid = '-1'Wink ORDER BY blockorder,title asc' at line 1. SQL in question: SELECT name,owner_id,group_id,perm_group,perm_members,perm_anon FROM gl_blocks WHERE onleft = 1 AND is_enabled = 1 AND (tid = 'all' AND type <> 'layout'Wink AND (bid NOT IN (13,5,7,12,) OR bid = '-1'Wink ORDER BY blockorder,title asc

Any ideas?
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
I don`t know it this is helping you but I remember some problems with the language file which had led to me being stuck too. Mabye copy over the current language files again and switch to English for testing.
 Quote

grf

Anonymous
All other users use the same language file and all ok Frown
 Quote

grf

Anonymous
no ideas?
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Quote by: grf

All other users use the same language file and all ok Frown



Maybe as long as they don`t change the preferences. I`d recommend copying over all the new 1.4.1 files again incl. the language files and theme. Then do the theme changes again.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: grf

Some users report to me about they cant login after edit users preferences (hide some blocks, or other options).


I realize this answer is coming a bit late, but I just ran into this same problem and found out what's causing it.

Effectively, when Geeklog stores the list of "boxes" to show (My Account > Content > Show & hide boxes), it adds an extra space to the end of the list which, upon reading that list again, is translated into a stray comma that causes the SQL error.

The fix to prevent that from happening is simple. Fixing the account of an affected user is not so easy. It's probably best to just reset the list to be empty and ask the user to make the selection again. Something like

Text Formatted Code
UPDATE gl_userindex SET boxes = '' WHERE uid = 42;

(where 42 = the user's actual uid)

bye, Dirk
 Quote

All times are EST. The time is now 07:59 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