Non-admin user receives the following error on a fresh install of 7.10 core (minimal profile).

On screen message

Error

The website encountered an unexpected error. Please try again later.

Dblog message:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 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 '))' at line 1: SELECT ml.p1 AS p1, ml.p2 AS p2, ml.p3 AS p3, ml.p4 AS p4, ml.p5 AS p5, ml.p6 AS p6, ml.p7 AS p7, ml.p8 AS p8, ml.p9 AS p9 FROM {menu_links} ml WHERE (router_path IN ()) ; Array ( ) in admin_menu_tree_dynamic() (line 76 of /data/disk/o1/distro/001/drupal-7.10/sites/example.com/modules/admin_menu/admin_menu.inc).

Resolution
The admin user doesn't receive errors but any other user with permissions does.

I created a fresh install with the standard profile to compare and no issues. So I went through and a/b tested the two sites by disabling modules on the working 'standard' profile. The working site broke once the Field UI module was disabled. Once the Field UI module was enabled on the 'minimal' profile, the issue was resolved.

Comments

petsagouris’s picture

I believe that this can be solved by surrounding the field_ui_admin_menu_map() located in the admin_menu.map.inc@line:66 with something like this:

<?php
if(module_exists('field_ui'){
  /**
  * Implements hook_admin_menu_map() on behalf of Field UI module.
  */
  function field_ui_admin_menu_map() {
    $map = array();
    foreach (entity_get_info() as $obj_type => $info) {
      // ...
    }
    return $map;
  }
}
?>

Maybe it would be wise to actually wrap all the functions in that file with the appropriate module_exists() check for each respective module. Another option would be to state the dependency in the admin_menu.info file.

sun’s picture

Status: Active » Closed (cannot reproduce)

I just tried the exact outlined steps myself, but I'm not able to replicate this issue.

Please make sure you also test whether this issue still exists when using the latest versions/development snapshots of affected modules. If that does not help, then also try to temporarily disable potentially conflicting modules that may interfere with this functionality.