Download & Extend

PDOException: SQLSTATE[42S22] for simplenews

Project:Simplenews
Version:7.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hello,

I had a newsletter up and running with D6. After upgrading to D7, I have a lot of problems with Simplenews and other modules and I am tackling them one by one. When I installed and enabled the Simplenews module, I realized that whenever a new user registers, an error happens and the user is not able to register completely. Here is the error

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'timestamp' in 'field list': INSERT INTO {simplenews_subscription} (tid, snid, status, timestamp, source) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => 9 [:db_insert_placeholder_1] => 347 [:db_insert_placeholder_2] => 1 [:db_insert_placeholder_3] => 1337102935 [:db_insert_placeholder_4] => website ) in simplenews_subscription_save() (line 1513 of/home/****/public_html/****/sites/all/modules/simplenews/simplenews.module).

I don't know if this should be fixed by Simplenews module or MySQL.

I appreciate any solution and thank you for your help in advance.

P.S. The website is up and running with D7.14 and can be accessed at http://www.computervisiononline.com/

James

Comments

#1

Status:active» postponed (maintainer needs more info)

Can you check if the 7.x-1.x-dev version works better? You might need to repeat the update process because we had to change some of the existing functions. I don't think we changed anything related to that column, though. It's possible that this one is still broken.

#2

@Berdir, I used 7.x-1.x-dev version and the error is gone but not sure it is the reason. I am trying different modules. Thanks
P.S. After updating all the subscriptions are gone but I will add them manually.

#3

Hello.
I do have the exact same problem.
After an upgrade to D7 I'm having a PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'timestamp' in 'field list'

I checked in the database I have no "timestamp" and no "source" column in the table "simplenews_subscription".
Installing the dev version involved 2 more updates wich had NO better effect on this problem.

I'll try to check in the install file what the module missed during the update and report if I can find something.
Best.

#4

Status:postponed (maintainer needs more info)» active

Quite possible that this is an upgrade but then. From which major version are you upgrading? 6.x-2.x or 6.x-1.x?

#5

Status:active» postponed (maintainer needs more info)

Ouch...
I could have been too fast with this migration project.

On my past simplenews.info file is :
; $Id: simplenews.info,v 1.5.2.1 2008/08/04 06:11:51 sutharsan Exp $

I assume this is 6.x-1.x
Did I missed a step in the upgrade ? Should I had to upgrade to 6.x-2 before joining 7 ?

Thank for your help !
++

#6

wow, that does look rather old ;)

Upgrading from 6.x-1.x is supported*, but make sure that you are using the most recent version of that branch.

* supported doesn't necessary mean that it does work, but it's supposed to. Will check later today.

#7

Status:postponed (maintainer needs more info)» active

Yes sorry I just checked again cause I couldn't believe I was such stupid.
The version I mentionned was what I received from them (not updated) - I did an update of all their module before going to 7.

So I can confirm I used the latest 6.x-2 before shifting.

I will just try a manual update of those missing filed. I guess it will just work.
I will report soon.
Thank you very much for being fast and helpfull.
++

#8

As excpected adding manually both field (timestamp, source) fixed the problem.
Still not 100% sure this bug came from the module.
Best.
++

#9

Hello again,

I am still having problem sending a newsletter in html format. I use htmlmail+simplenews+mailsystem. I realized that once you install simplenews module, it creates another newsletter vocabulary and that results in ignoring all previous subscriptions. I thought that might give a clue for further digging.

I appreciate any help for sending our newsletter in html format, it is almost two months that we are not able to send the newsletter out.

Thanks

#10

Version:7.x-1.0-beta2» 7.x-1.x-dev
Status:active» needs review

This column has been added in 6.x-2.x with the update function simplenews_update_6253(). So if you updated to 6.x-2.x before doing the upgrade to 7.x, this should not have happened. Can you check which schema version (see schema table) you had before updating?

6.x-1.x might be different, not sure actually.

Attaching a patch that extends our upgrade tests and attempts to add a subscriber for both 6.x-1.x an 6.x-2.x upgrade tests. Let's what happens, I'm not able to run these upgrade tests locally.

AttachmentSizeStatusTest resultOperations
upgrade_test_add_subscriber.patch846 bytesIdleFAILED: [[SimpleTest]]: [MySQL] 1,746 pass(es), 2 fail(s), and 0 exception(s).View details

#11

Status:needs review» needs work

The last submitted patch, upgrade_test_add_subscriber.patch, failed testing.

#12

Status:needs work» needs review

Hm, let's try that again.

AttachmentSizeStatusTest resultOperations
upgrade_test_add_subscriber-1587798-12.patch896 bytesIdleFAILED: [[SimpleTest]]: [MySQL] 1,742 pass(es), 0 fail(s), and 3 exception(s).View details

#13

Status:needs review» needs work

The last submitted patch, upgrade_test_add_subscriber-1587798-12.patch, failed testing.

#14

Status:needs work» needs review

Ok, so it actually does look like 6.x-2.x works but 6.x-1.x doesn't. The 6.x-2.x still failed, but that's because I didn't prevent the mail confirmation mail which doesn't work at that point in the tests.

AttachmentSizeStatusTest resultOperations
upgrade_test_add_subscriber-1587798-14.patch903 bytesIdleFAILED: [[SimpleTest]]: [MySQL] 1,775 pass(es), 0 fail(s), and 1 exception(s).View details

#15

Status:needs review» needs work

The last submitted patch, upgrade_test_add_subscriber-1587798-14.patch, failed testing.

#16

Status:needs work» needs review

Yep, exactly.

Which means that this patch should fix it, also for already upgraded installations. So this should be green.

AttachmentSizeStatusTest resultOperations
upgrade_test_add_subscriber-1587798-16.patch1.61 KBIdleFAILED: [[SimpleTest]]: [MySQL] 1,774 pass(es), 1 fail(s), and 1 exception(s).View details

#17

Status:needs review» needs work

The last submitted patch, upgrade_test_add_subscriber-1587798-16.patch, failed testing.

#18

Status:needs work» needs review

Ah yes, the source column is missing as well, as pointed out in #8.

AttachmentSizeStatusTest resultOperations
upgrade_test_add_subscriber-1587798-18.patch1.92 KBIdlePASSED: [[SimpleTest]]: [MySQL] 1,800 pass(es).View details

#19

Status:needs review» fixed

Commited.

#20

I don't know how to apply patch, sorry, I can not be of any help. Is it possible to give me detailed instruction on how to send an html email using Simplenews 7.x, I am following the same instruction in D6 and it was working.

#21

This patch has already been commited and has nothing to do with HTML mails. If you have problems sending mails, open a support request and describe exactly what modules you have installed, how you have them configured (best: provide screenshot of the various settings pages).

#22

I updated simplenews from 6 to 7 version using the last dev files (which includes this patch above) and it came with two newsletter categories with no name nor subscribers for them.
In 6 version I had one category with lots of subscribers...

What may have gone wrong?

#23

Please open a separate issue and describe from which version you were upgrading and provide screenshots, if possible.

#24

Status:fixed» closed (fixed)

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

nobody click here