I have Drupal 6.1.

I copied the latest versions of Forward module files from CVS. I added them under \sites\all\modules\forward20080331. Then I went to Administer > Site Building > Modules, checked Forward and then clicked Save configuration. After some processing, the module seems to be installed. However, on top of the page, there are the following warnings:

* warning: Invalid argument supplied for foreach() in C:\Program Files\wamp\www\DrupalSandbox1\includes\common.inc on line 3164.
* warning: Invalid argument supplied for foreach() in C:\Program Files\wamp\www\DrupalSandbox1\includes\common.inc on line 3085.

Judgin by the content of forward.schema, a table forward_log should be created in the database. However, the table does not exist.

Comments

miki_nl’s picture

The table was not created indeed. When I tried to email a page, I got an error that table forward_log does not exist. I created that table which took care of the problem.

miki_nl’s picture

I rewrote the function forward_schema() as shown below (definition of index is done as described in Drupal API documentation). Furthermore, I moved this function to forward.install. After uninstalling and installing the module in Administer > Site building, the table was created. I don't know which of the two actions helped. I started to explore the the Drupal module code only yesterday.

function forward_schema() {
$schema['forward_log'] = array(
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0),
'type' => array(
'type' => 'varchar',
'not null' => TRUE,
'default' => 0,
'length' => 8),
'timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0)
),
'indexes' => array(
'nid_index' => array('nid'),
),
);
return $schema;
}

seanr’s picture

Status: Active » Fixed

This should all be working correctly now.

Status: Fixed » Closed (fixed)

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