[support] Comment/Settings page error
sander-martijn
lists at severeddreams.com
Thu Nov 29 22:16:32 UTC 2007
if you don't have tons of users (or even if you do but it's worth the
time) I would take a look at the following tables: users, role,
users_roles and permission. Maybe there's some corrupt data in one of
those tables - if an sql error is getting thrown then the arrays
wouldn't get populated. Also I guess the comments table although it
looks like this is an error on the user/permission side rather than
anything comment related specifically.
Also if you haven't yet done this, check the logs (/admin/logs/watchdog)
to see if it gives any further info.
If neither of those work what I would do next is try to run those
database queries using the console or phpMyAdmin to see what they say,
replacing the variables with relevant replacements. I did that recently
with a module I was having trouble with and found that while the sql was
written ok in the module code it was being modified by something in core
to something that didn't work. I modified the module code slightly and
it worked fine after that (it was the location module in that case, not
a core module).
.s
Skip Taylor wrote:
> Hello Jason,
>
> No mods that I'm aware of. The module size, time and date match the one
> from the distribution file.
> Below is my user.module starting at line 365. From what I can see it
> matches perfectly the user.module in the distribution file.
>
> Thanks,
> Skip
>
> 365 // To reduce the number of SQL queries, we cache the user's permissions
> 366 // in a static variable.
> 367 if (!isset($perm[$account->uid])) {
> 368 $rids = array_keys($account->roles);
> 369 $placeholders = implode(',', array_fill(0, count($rids), '%d'));
> 370 $result = db_query("SELECT DISTINCT(p.perm) FROM {role} r INNER
> JOIN {permission} p ON p.rid = r.rid WHERE r.rid IN ($placeholders)",
> $rids);
> 371 $perm[$account->uid] = '';
> 372 while ($row = db_fetch_object($result)) {
> 373 $perm[$account->uid] .= "$row->perm, ";
>
> On Nov 29, 2007 12:56 PM, Jason Flatt <drupal at oadaeh.net
> <mailto:drupal at oadaeh.net>> wrote:
>
> On Thursday 29 November 2007 12:33:04 Skip Taylor wrote:
> > Hello,
> >
> > I've had this on the Drupal forum for almost a week with no
> reply. I hope
> > someone here has an idea!
> >
> > Using Drupal 5.3. Site is upgraded. Originally 4.6 (new), then to
> 4.7, then
> > to 5.3 if that matters. Theme is BlueMarine.
> >
> > When I go to the comment/settings page, I get these 4 errors
> reliably in
> > the log:
> >
> > Location: http://www.mydomain.com/admin/content/comment/settings
> > Message: array_keys()
> > [function.array-keys<http://drupal.org/node/function.array-keys>]:
> > The first argument should be an array in
> /modules/user/user.module on line
> > 368.
> > --------
> > Location: http://www.mydomain.com/admin/content/comment/settings
> > Message: array_fill()
> > [function.array-fill<http://drupal.org/node/function.array-fill
> <http://drupal.org/node/function.array-fill>>]:
> > Number of elements must be positive in /modules/user/user.module
> on line
> > 369.
> > --------
> > Location: http://www.mydomain.com/admin/content/comment/settings
> > Message: implode()
> > [function.implode<http://drupal.org/node/function.implode
> <http://drupal.org/node/function.implode>>]: Bad arguments.
> > in /modules/user/user.module on line 369.
> > --------
> > Location: http://www.mydomain.com/admin/content/comment/settings
> <http://www.mydomain.com/admin/content/comment/settings>
> > Message: 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 query: SELECT DISTINCT(p.perm ) FROM role r INNER JOIN
> > permission p ON p.rid = r.rid WHERE r.rid IN () in
> > /includes/database.mysql.inc on line 172.
> >
> > I've disabled ALL modules, yet the error persists. Not sure where
> to go
> > with this next. Is it a problem with comments , something wrong
> in the
> > database or the user database/module?
> >
> > Thanks for any ideas!
> >
> > Regards,
> > Skip Taylor
>
> Has anyone modified that file? What is on lines 368 and 369 of
> your /modules/user/user.module file?
>
> --
> Jason Flatt
> http://www.oadaeh.net/
> Father of Six: http://www.flattfamily.com/ (Joseph, 14; Cramer,
> 12; Travis,
> 10; Angela; Harry, 7; and William, 12:04 am, 12-29-2005)
> Linux User: http://www.xubuntu.org/
> Drupal Fanatic: http://drupal.org/
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
>
>
>
> --
> Half of being smart is knowing what you're dumb at. -- David Gerrold
> ---
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information.
> Any unauthorized review, use, disclosure or distribution is prohibited.
> If you are not the intended recipient, please contact the sender by
> reply email and destroy all copies of the original message.
>
More information about the support
mailing list