Hello

I discovered that trying to change the templates seems to not work properly, throwing the message user warning: Unknown column 'format' in 'field list' query: INSERT INTO messaging_message_parts(type, method, msgkey, module, message, language, format, data) VALUES ('notifications-content-blog_post-update', 'default', 'subject', 'notifications_nodetype', 'Mise à jour de : [title]', 'fr', 0, 's:0:\"\";') in ...pressflow-6/includes/common.inc on line 3470.

Seems like some fields are not properly created in the message part table during the update.

The consequence being that translation is impossible and fallback too, the fields can't be voided.

Am I alone with this trouble ?

Maybe a simple alter table would then solve the problem but what type is the missing field ?

thanks a lot for your time.

Comments

ozecho’s picture

nope... you are not alone...

I just upgraded and have the same problem!

Do we know what the table "should" look like?

Here is the definition I have in my database:

type varchar(100)
method varchar(50)
msgkey varchar(100)
module varchar(255)
message longtext
tpid int(10) unsigned
language varchar(12)

whats missing?

ozecho’s picture

As best as I can work out, its a problem with the upgrade script. It incorrectly checks for the "language" field rather than one of the new fields, "format" or "data".

Here is the incorrect code:

function messaging_update_6012() {
  $ret = array();
  if (db_table_exists('messaging_message_parts') && !db_column_exists('messaging_message_parts', 'language')) {
    module_load_install('messaging_template');                                                     ^^^^^^
    $ret = messaging_template_update_6001();                                                       |||||||
  }
  return $ret;
}

Here is what I ran as my alter script

alter table `messaging_message_parts` 
   add column `format` int DEFAULT '0' NOT NULL after `language`, 
   add column `data` longtext NOT NULL after `format`
jose reyero’s picture

Status: Active » Fixed

Fixed with one more update, thanks

Status: Fixed » Closed (fixed)

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

acushla’s picture

I tried all the things suggested here but to my disappointment noting worked for me. Eventually I disabled AND un-installed messaging and notification. On re-enabling things, they seemed to work seamlessly.
Clearly this is an upgrade issues and even more clearly, my solution is a bad one. However, I thought it just might be of help for someone who does not mind letting go of the precious settings.
Thanks,
Rajat