Location http://example.com/admin/structure/block
Referrer http://example.com/content/node-1

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'menu_custom.menu_name' in 'field list': SELECT menu_custom.menu_name FROM {menu_custom}, {og_menu} WHERE og_menu.menu_name = menu_custom.menu_name; Array ( ) in og_menu_form_block_admin_display_form_alter() (line 410 of /***/og_menu/og_menu.module).

  • og_menu 7.x-2.x-dev as of 2011-11-25
  • drupal 7.9

Comments

rv0’s picture

Status: Active » Postponed (maintainer needs more info)

Are you using table prefixes in your database?

Refineo’s picture

Yes, indeed. I use table prefixes for Drupal installs. For example "d_tablename" instead of "tablename".

rv0’s picture

Status: Postponed (maintainer needs more info) » Fixed

In that case a fix is easy

committed to dev.

--- a/og_menu.module
+++ b/og_menu.module
@@ -407,7 +407,7 @@ function og_menu_form_block_admin_display_form_alter(&$form, &$form_state) {
 // Only show og menu blocks on the block admin page if the user wants it.
   if (!variable_get('og_menu_show_blocks', FALSE)) {
     // @todo convert to new database api functions
-    $result = db_query("SELECT menu_custom.menu_name FROM {menu_custom}, {og_menu} WHERE og_menu.menu_name = menu_custom.menu_name")->fetchCol();
+    $result = db_query("SELECT mc.menu_name FROM {menu_custom} mc, {og_menu} ogm WHERE ogm.menu_name = mc.menu_name")->fetchCol();
     foreach ($result as $ogblock) {
       unset($form['blocks']['menu_' . $ogblock]);
     }

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.