[support] I bit of a screw up...and needs some guidens

Anders Andersson anders.per.andersson at gmail.com
Sat Jul 30 10:06:16 UTC 2011


Hello!

My name is Anders and I hope someone can direct me towards a good solution
on my problem, which I get everywhere (homescreen for instance) except in
the admin area (Modules, Configurations etc):

*PDOException*: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:
invalid input syntax for integer: "all" LINE 4: WHERE (base.uid IN ('all'))
^: SELECT base.uid AS uid, base.name AS name, base.pass AS pass, base.mail
AS mail, base.theme AS theme, base.signature AS signature,
base.signature_format AS signature_format, base.created AS created,
base.access AS access, base.login AS login, base.status AS status,
base.timezone AS timezone, base.language AS language, base.picture AS
picture, base.init AS init, base.data AS data FROM {users} base WHERE
(base.uid IN (:db_condition_placeholder_0)) ; Array (
[:db_condition_placeholder_0] => all ) i *
DrupalDefaultEntityController->load()* (rad *196* av *
/var/www/drupal/includes/entity.inc*).

It does select * from users where uid in ("all"); which doesn't work since
uid is a number in the users table.

I run drupal 7.4 with alot of modules and this happened after upgrading
date, calendar, fullcalendar and ctools to the latest development releases
as of 2011-07-29. There was something running when I pressed update.php but
I can't find what. I did some research with var_dump and debug_backtrack and
found a workaround:

--- /tmp/menu.inc.old    2011-07-30 02:38:00.566339402 -0700
+++ includes/menu.inc    2011-07-30 02:37:26.805708180 -0700
@@ -902,6 +902,7 @@
     }
     // menu_tree_check_access() may set this ahead of time for links to
nodes.
     if (!isset($item['access'])) {
+      if (count($map) == 3 && $map[0] == "user" && $map[1] == "all" &&
$map[2] == "bookmarks") { $map[1] = 0; }
       if (!empty($item['load_functions']) && !_menu_load_objects($item,
$map)) {
         // An error occurred loading an object.
         $item['access'] = FALSE;

If map == ("user","all","bookmarks") I change the string "all" to integer 0.
the problem boils down to the function that gets called right after my fix
above, with $uid = $map[1]:

function user_load($uid, $reset = FALSE) {
  $users = user_load_multiple(array($uid), array(), $reset);
  return reset($users);
}

According to the comment just above the function, uid has to be a number
(not the string "all"). I would like to find the right module and fix that
instead.

After a lot of fiddling with disabling and enabling module I got things
"working" after disabling all installed modules including the addons that
was shippet with Drupal itself. When I then enable the core module Block, I
get the error again!

This letter is getting very lengthy, so I won't burden you with more info. I
got big stacktraces and more stuff to write, but I don't know what interest
you in this problem. All I want is help to find the real thing, where is the
real error? How to find it?

Just do avoid unnecessary flames:
I did a little bit of screwup with my drupal site. Feel free to blame me
about backups and things like that, yes it was due to a missunderstanding
(bad crontab-job) and I didn't check for them...:-) Feel also free to
complain about the usage of alpha/devel-modules but to get modules for
drupal 7, since that was the version someone selected,you have to use
alpha/beta/devel versions.


Thanks alot for any help/guidens to the solution of the problem.

Anders Andersson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110730/532a959e/attachment.html 


More information about the support mailing list