Jump to:
| Project: | Simplenews |
| Version: | 7.x-1.0 |
| Component: | Usability |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Everything on Simplenews works except that I cannot send newsletter to list, but I can send test email.
When trying to send newsletter, I get the following error:
HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /?q=batch&id=9&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'error' in 'field list': UPDATE {simplenews_mail_spool} SET status=:db_update_placeholder_0, error=:db_update_placeholder_1, timestamp=:db_update_placeholder_2 WHERE (msid IN (:db_condition_placeholder_0, :db_condition_placeholder_1, .................................. [:db_condition_placeholder_277] => 278 ) in simplenews_update_spool() (line 477 of /home/ shows my user name here /public_html/sites/all/modules/simplenews/includes/simplenews.mail.inc).
Test mail works perfectly.
Error occurs whether sending by cron or without cron, so the issue is not related to cron.
newsletters were sent ok before updating from Drupal 6.26. I am now on Drupal 7.17.
Have deleted and reinstalled Simplenews.
I have run update.php
I even tried enabling Simplenews Rules, but this made no difference.
Would appreciate any suggestion on how to solve this problem.
Comments
#1
Other modules won't help.
It seems our upgrade procedure didn't complet well in your case.
We don't support Upgrade from 6.x-1.x branch to 7.x directly. Did you upgrade to Simplenews 6.x-2.x first?
Before upgrading to the next major version, ALWAYS upgrade to the latest version of your previous major version. That's the offical upgrade path.
Checking the 7.x branch: The error column should just be there since a very early 6.x version
598 /**
599 * Addition of error to simplenews_mail_cache to mark an email error.
600 */
601 function simplenews_update_6009() {
602 $ret = array();
603 db_add_field($ret, 'simplenews_mail_spool', 'error', array('type' => 'int', 'not null' => TRUE, 'default' => 0));
604 return $ret;
605 }
Now your database is missing some changes and the only way i see it adding them manually.
This project can help you identify schema errors:
http://drupal.org/project/schema
At least it will show you what's wrong. I think you will still need to create the columns manually in the database (e.g. using phpmyadmin).
#2
We even do support upgrading from the latest 6.x-1.x version too, but it looks like you've upgraded from an older version.
#3
Hi Miro
thanks for looking at this.
The good news is that I was able to send a newsletter.
Just to let you know what I did. In PHPmyadmin, I added the column "error" to simplenews_mail_spool (as you instructed above). I put this at the end - not sure if there is any particular order required.
I have installed the Schema module. Here is the comparison report:
simplenews_subscription
primary key: missing in database
simplenews_mail_spool
column error - difference on: size
declared: array('description' => 'TODO: please describe this field!', 'type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 0)
actual: array('description' => 'TODO: please describe this field!', 'type' => 'int', 'not null' => TRUE, 'default' => 0)
Should I set a primary key?
Should I be making any additional changes?
Thank you
#4
Automatically closed -- issue fixed for 2 weeks with no activity.