Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By irwin on
I upgraded using the update.php script and it went fine. However, when I browse the site as any user, I get errors whenever I access any one of the nodes.
* warning: array_keys() [function.array-keys]: The first argument should be an array in /usr/local/www/suikoden/modules/user.module on line 349.
* warning: implode() [function.implode]: Bad arguments. in /usr/local/www/suikoden/modules/user.module on line 349.
* user warning: 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 /usr/local/www/suikoden/includes/database.mysql.inc on line 120.
The offending line on user.module:349 is:
// To reduce the number of SQL queries, we cache the user's permissions
// in a static variable.
if (!isset($perm[$account->uid])) {
// This line right here breaks.
$result = db_query("SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid WHERE r.rid IN (%s)", implode(',', array_keys($account->roles)));
// It seems that $account->roles is not an array, or something like that.
$perm[$account->uid] = '';
while ($row = db_fetch_object($result)) {
$perm[$account->uid] .= "$row->perm, ";
}
}
These errors don't seem to occur on a fresh installation, so it appears to be something with the database. Any clues on what I can do to repair the problem?
Comments
What contrib modules are enabled?
- Robert Douglass
-----
My Drupal book: Building Online Communities with Drupal, phpBB and WordPress
flexinode, notify,
flexinode, notify, urlfilter, bbcode, quote.
(As an aside, I ended up switching the installation down to 4.6.8, so I don't technically require a fix for this issue anymore, but I've seen at least two other users post about it, so it might be of interest to others).
-- Irwin
* Drupal at work -> http://suikoden.mine.nu (Suikoden-themed Role-playing Game.)
* My other Drupal site -> http://scrapped.mine.nu (Video-game & Anime-themed Blog)
I have exactly the same
I have exactly the same problem, someone know how to fix?
I've just has this come up
I've just has this come up when i tried to create a donation product - anyone know how to fix it yet?
Lucy
I have this error when i
I have this error when i have enable de .htaccess.
Anyone know something?
Turns out it might be the
Turns out it might be the private messaging module thats causing the problem - i've disabled mine and the problem has stopped.
Disabling Pvt Msg works for.
Disabling Pvt Msg works for. I have upgraded form 4.6.7 to 4.7.2 with 1st checking modules compatibility.
Not relating to priv msg
I have exactly the same error after upgrading from 4.7RC to 4.7.2. However I didn't install the private message module.
I search around and it seems the only known cause of the problem is priv. message module. I think there are something else also introduces this problem.
I have this problem in the comments section
this problem appears for me in the comments settings area and no comments can be published even though they appear in the DB.
Same problem with products
I get the same error when I try to convert an image to any type of product, when the product is saved. Here is the full error:
Disabling private messaging work fine!
Thanks for the tip! Turning off private messaging works fine with me.
the same problem, try on
the same problem,
try on server console:
select * from users; - no ansver;
MySQLrefman:
When not running in strict mode, if you assign a value to a BLOB or TEXT column that exceeds the data type's maximum length, the value is truncated to fit. If the truncated characters are not spaces, a warning is generated. You can cause an error to occur and the value to be rejected rather than to be truncated with a warning by using strict SQL mode. See Section 5.2.5, “The Server SQL Mode”.
after altering users.data from longtext to varchar
select * from users; - seems work, but the site still down...
no additional modules instaled
Do you have any suggestion?