After install of 5.x-1.x-dev into Drupal 5.3, I stumbled across several mySQL errors when trying to insert into or query from table "ejournal_log". A quick peek with phpMyAdmin showed the table was never created on module install. I manually created the table and added what bits of structure I could discern from the errors, but I am concerned that I did not get all of the structure there, and that it may be causing other errors now or cause them in the future.

So, please post the entire, correct table structure for ejournal_log for me, including mySQL datatypes, extras, etc. Thanks.

Comments

romca’s picture

hi,
strange indeed, i will have to take a look if the modules packaged by drupal contain the correct files. If you go into the ejournal.install file, you should find

      db_query("CREATE TABLE {ejournal_log} (
        lid int(9) NOT NULL auto_increment,
        id int(9) NOT NULL default '0',
        entity varchar(16) NOT NULL default '',
        uid int(6) NOT NULL default '0',
        type varchar(16) NOT NULL default '',
        message text NOT NULL default '',
        hostname varchar(128) NOT NULL default '',
        timestamp int(11) NOT NULL default '0',
        PRIMARY KEY  (lid)
      ) Type=MyISAM;");

please try to upgrade the module, from the module list, above the table, click on the "upgrade"
If Drupal gives you an option to upgrade ejournal, then do it. The upgrade function will fix the log table. But it would strange if your installation was fresh.

higherform’s picture

I manually edited the ejournal_log table in phpmyadmin to match the table definition you provided (I was already pretty close on most of my guesses)... lets see if this keeps any gremlins away...

I did run the update.php page, selected "2" for ejournal module.... got these results:

Update #2

* Failed: alter table {ejournal_articles_log} ,change `id` `lid` int (9) NOT NULL AUTO_INCREMENT , change `nid` `id` int (9) NOT NULL , change `iid` `entity` varchar (16) NOT NULL
* Failed: rename table {ejournal_articles_log} to {ejournal_log}
* update {ejournal_log} set message=concat(message, ' (iid: ', `entity`, ')')
* update {ejournal_log} set type='notice' where type='message'
* alter table {ejournal_log} add index `id` ( `id` )
* update ejournal_log set entity='node', type='insert' where message like '%insert%'
* update ejournal_log set entity='node', type='update' where message like '%proofreader%'
* update ejournal_log set entity='node', type='update' where message like '%section%'
* update ejournal_log set entity='node', type='update' where message like '%is unpublished%'
* update ejournal_log set entity='node', type='update' where message like '%issue changed%'
* update ejournal_log set entity='node', type='message' where entity not in ('node')

looks like you changed the name of the table near this version? maybe the install / upgrad files that normally create ejournal_log might still have statements pointing to ejournal_articles_log ? just a thought...

romca’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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