In the Reports/DBlog from time to time I'm getting the following Messages:
Failed to insert item into amazon table: Message = SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1, query= INSERT INTO {amazon_music} (asin, label, numberofdiscs, studio, artist) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4_0, :db_insert_placeholder_4_1) fields=Array()
Failed to insert item into amazon table: Message = SQLSTATE[HY000]: General error: 1364 Field 'ean' doesn't have a default value, query= INSERT INTO {amazon_book} (asin, publicationdate) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1) fields=Array()
Is this a bug or am I doing something wrong?
Comments
Comment #1
rfayHave you done an update and not run update.php?
What database are you using? Mariadb? Mysql? Postgres?
It seems odd that this hasn't been reported before, but could be a problem with just the music table.
Could you please report what ASIN this was trying to use?
Comment #2
rfayJust tested with asin B0000058HT (and a number of others) and I don't see this error when creating a node or when running cron. I have amazon_media enabled.
I'll need a complete step-by-step to look at this.
Comment #3
smitty commented>Have you done an update and not run update.php?
No.
>What database are you using? Mariadb? Mysql? Postgres?
Mysql
>Could you please report what ASIN this was trying to use?
No. I'm just seeing these messages in the reports (approximately once a day).
I don't have any clue where they come from and what they do mean.
Comment #4
rsjaffe commentedI'm getting the same error messages. They're coming in pairs every 10th time the module updates Amazon items.
Here's a typical message:
Comment #5
rfayAmazon seems not to always provide the EAN, but the schema has it as required.
Committed http://drupalcode.org/project/amazon.git/commitdiff/3400aa9 -
Please try the latest dev when it updates (every 12 hours) and you *must run update.php*
Please run update.php after you update to latest dev
This also adds a debug message which will help us understand what ASIN was causing the problem.
Comment #6
rsjaffe commentedDrupal won't let me change to the development version--it states "amazon module already installed" when I try to install the development version. Is there a manual patch I could apply to include the debugging? I'm pretty comfortable with PHP programming.
Thanks
PS--Are the debug messages in the watchdog calls in the amazon_http_request function?
Comment #7
rfay@rsjaffe, you wouldn't *install* Amazon module if it was already installed... You would just update the code and then run update.php.
Can you say more about what you're trying to do?
Comment #8
rsjaffe commentedOK--I was using the "Module" page, the "install new module" link, with the assumption that that would allow a move from the release to development version. How do I do a forced update? Do I delete the old module on the server and unzip the new one in its place, then run update.php?
Comment #9
rfayWhenever you update a module, you run update.php, as in visiting http://example.com/update.php
You can also do it with
drush updatedb
But I'm betting you're not using drush yet.
The big picture is explained in http://drupal.org/upgrade
Comment #10
rsjaffe commentedCan't get drush to work on my site--using a shared server. I was able to install the development version of the module. Stay tuned for results... Should be available in 12 hours or so.
Comment #11
rsjaffe commentedHah! Since I changed to the development version, the errors stopped. I'll post again if the error shows up.