After installation: Invalid argument supplied for foreach() on line 3286

kenorb - January 22, 2009 - 02:56
Project:Glossary
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

After installation:

warning: Invalid argument supplied for foreach() in /home/sites/example.com/public_html/includes/common.inc on line 3286.
warning: Invalid argument supplied for foreach() in /home/sites/example.com/public_html/includes/common.inc on line 3207.
Installed G2 schema

common.inc

<?php
function _drupal_initialize_schema($module, &$schema) {
 
// Set the name and module key for all tables.
 
foreach ($schema as $name => $table) { // line 3286
?>

<?php
function drupal_install_schema($module) {
 
$schema = drupal_get_schema_unprocessed($module);
 
_drupal_initialize_schema($module, $schema);

 
$ret = array();
  foreach (
$schema as $name => $table) { // line 3207
   
db_create_table($ret, $name, $table);
  }
?>

#1

kenorb - January 22, 2009 - 03:01
Priority:normal» critical

So the schema wasn't created, because after using the module, I've got following errors:

user warning: Table 'web245-polandia.g2_node' doesn't exist query: INSERT INTO g2_node (nid, period, complement, origin) VALUES (2006, '', '', '') in /home/sites/example.com/public_html/sites/all/modules/contributions/g2/g2.module on line 1190.
user warning: Table 'web245-polandia.g2_node' doesn't exist query: SELECT * FROM g2_node WHERE nid = 2006 in /home/sites/example.com/public_html/sites/all/modules/contributions/g2/g2.module on line 1201.
user warning: Table 'web245-polandia.g2_node' doesn't exist query: SELECT * FROM g2_node WHERE nid = 2006 in /home/sites/example.com/public_html/sites/all/modules/contributions/g2/g2.module on line 1201.
user warning: Table 'web245-polandia.g2_referer' doesn't exist query: UPDATE g2_referer SET incoming = incoming + 1 WHERE nid = 2006 AND referer = 'node/add/g2-entry' in /home/sites/example.com/public_html/sites/all/modules/contributions/g2/g2.module on line 1757.

#2

layik - June 9, 2009 - 19:25

Could you tell me if you sorted this issue out? and if so could you tell us please?

 
 

Drupal is a registered trademark of Dries Buytaert.