PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_imagen_teaser_blog_width' in 'field list': INSERT INTO {field_data_field_imagen_teaser_blog} (entity_type, entity_id, revision_id, bundle, delta, language, field_imagen_teaser_blog_fid, field_imagen_teaser_blog_alt, field_imagen_teaser_blog_title, field_imagen_teaser_blog_width, field_imagen_teaser_blog_height) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 56 [:db_insert_placeholder_2] => 56 [:db_insert_placeholder_3] => blog [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 52 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => 1024 [:db_insert_placeholder_10] => 768 ) in field_sql_storage_field_storage_write() (line 448 of /home/paulydash/psyche.cl/modules/field/modules/field_sql_storage/field_sql_storage.module).
When i try to post something in the blog drupal give me this error, the content is published anyway but incorrectly. Only the title of the post are saved, body, image and taxonomy are missed after publish.
I only have one extra image field in the blog type content, in Drupal 7.8 it works perfect, but after the upgrade to 7.9 can't publish in the blog.
I've tried publish a simple page content and it works, i don't know what are happening here. Even upgrading to 7.x dev version the problem still there.
Images of all the process are attaches next. Please Help i don't know that to do.
Comment | File | Size | Author |
---|---|---|---|
#21 | first-screen.png | 18.95 KB | xjm |
#21 | apply.png | 5.32 KB | xjm |
#21 | attempted.png | 7.19 KB | xjm |
#21 | pending.png | 11.17 KB | xjm |
#6 | after update from 7.8 to 7.9.png | 474.01 KB | syodash |
Comments
Comment #1
syodash CreditAttribution: syodash commentedAfter deleting the image field the problem was solved. But there must be a way to repair the problem without having to delete part of the content. Because what is removed must be republished.
Comment #2
jbrown CreditAttribution: jbrown commentedYou need to run update.php after updating core.
Comment #3
syodash CreditAttribution: syodash commentedI ran update.php when upgrading to 7.9 did all the steps, even when tested with version 7.x dev but the problem is not resolved.
When I run cron and shows me the drupal status report tells me that everything is updated, but to clear all caches tells me there to update the script for the database, so I run update.php again but it tells me no updates are pending.
Now I'm restoring the original version with drupal 7.9 to see if some future update resolves the problem, the problem clearly has to do with image field because by eliminating of image field from blog content type the problem are solved, but i can't remove all images of the blog content.
Comment #4
syodash CreditAttribution: syodash commentedComment #5
xjm#3: update.php will not clear your caches if there are no updates pending in 7.9. (That just got fixed recently; see #1049284: Running update.php to flush caches no longer works unless there are updates pending). So I'd suggest clearing your caches manually by using the "Clear all caches" button at
admin/config/development/performance
. Have you tried that?Comment #6
syodash CreditAttribution: syodash commentedTry the solution you recommended, even went back to a previous version of the database was not updated and perform the upgrade process to 7.9 again. To my surprise now gone all the information of my content.
Returned to the database had already updated and will try to move forward from there. Back to the previous one was a disaster after upgrading to Drupal 7.9.
Comment #7
jbrown CreditAttribution: jbrown commentedIn #3 the reporter says the status report says update.php needs to be run, but when they do it says there are no updates to be performed. This is very odd, but it explains the error messages: the image update function is not being run.
Comment #8
MrsWho CreditAttribution: MrsWho commentedI have the same problem when I tried to upgrade my site on a local server copy of the site.
First, I went through the upgrade steps (from 7.8 to 7.9), and when I ran cron it gave me this message:
Notice: Undefined property: stdClass::$field_image_width in field_sql_storage_field_storage_load()
(May be unconnected, but the custom content type I created disappeared at this point).
I found this issue, then turned off all the performance options, cleared the cache, and reran the update.php process. When I tried to edit or create a node with an image, I got the following error message:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_image_width' in 'field list': INSERT INTO {field_data_field_image} (entity_type, entity_id, revision_id, bundle, delta, language, field_image_fid, field_image_alt, field_image_title, field_image_width, field_image_height) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 326 [:db_insert_placeholder_2] => 467 [:db_insert_placeholder_3] => book [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 459 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => 800 [:db_insert_placeholder_10] => 319 ) in field_sql_storage_field_storage_write() (line 448 of C:\wamp\www\fwbpress\modules\field\modules\field_sql_storage\field_sql_storage.module).
Comment #9
jbrown CreditAttribution: jbrown commentedCan you provide more information? Does status report say you still have database updates?
Comment #10
MrsWho CreditAttribution: MrsWho commentedI tried it again to get exactly what happened. My current site is version 7.8. I downloaded 7.9 and followed the instructions in UPGRADE.txt. First I put the site into maintaince mode. Then I deleted everything but the sites directory. I extracted the 7.9 files (sans the site folder) into the site directory & then ran update.php. After going through the database update process, I went to the status report and saw this message:
I ran cron, and got this error message 208 times:
Notice: Undefined property: stdClass::$field_image_width in field_sql_storage_field_storage_load() (line 360 of [drupal directory]\modules\field\modules\field_sql_storage\field_sql_storage.module).
Looking at how many times this message repeated, I believe it corresponds to how many nodes have images in them. When I try to edit a node with an image in it, I get this error message:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_image_width' in 'field list': INSERT INTO {field_data_field_image} (entity_type, entity_id, revision_id, bundle, delta, language, field_image_fid, field_image_alt, field_image_title, field_image_width, field_image_height) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10), (:db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14, :db_insert_placeholder_15, :db_insert_placeholder_16, :db_insert_placeholder_17, :db_insert_placeholder_18, :db_insert_placeholder_19, :db_insert_placeholder_20, :db_insert_placeholder_21); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 331 [:db_insert_placeholder_2] => 472 [:db_insert_placeholder_3] => book [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 453 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => 730 [:db_insert_placeholder_10] => 500 [:db_insert_placeholder_11] => node [:db_insert_placeholder_12] => 331 [:db_insert_placeholder_13] => 472 [:db_insert_placeholder_14] => book [:db_insert_placeholder_15] => 1 [:db_insert_placeholder_16] => und [:db_insert_placeholder_17] => 454 [:db_insert_placeholder_18] => [:db_insert_placeholder_19] => [:db_insert_placeholder_20] => 600 [:db_insert_placeholder_21] => 409 ) in field_sql_storage_field_storage_write() (line 448 of [drupal directory]\fwbpress\modules\field\modules\field_sql_storage\field_sql_storage.module).
Also, the custom content type I had developed disappeared. The nodes are still there I made from this content type, but I can't create a new one. Clearing the cache makes no difference.
Comment #11
catchIs that content type defined with hook_node_type()? Did you just create it in the UI? Or is it in a feature from features module? Is it still in the {node_type} table? If so is it disabled or enabled in there?
Comment #12
MrsWho CreditAttribution: MrsWho commentedI created the custom content type through the UI. Now that I look back at everything, I realize I was wrong about the custom content type disappearing: it's both in the node_type and the UI. However, I can't edit or create one with an image due to the same error message I reported above:
Comment #13
bcjmpr CreditAttribution: bcjmpr commentedSame thing happened to me when updating from 7.8 to 7.9. Every node with images showed error: Undefined property: stdClass::$field_image_width in field_sql_storage_field_storage_load().
As they suggested above, I ran cron and as it turns out the DB was not up to date, so I ran update.php again and the problem was solved.
Comment #14
MrsWho CreditAttribution: MrsWho commentedI'm glad you've got everything working bcjmpr, though even after running update.php and cron I have nothing.
Comment #15
lucy CreditAttribution: lucy commentedI have had the same problem. Tried update and cache clearing - it didn't help. Deleting the image field solved the problem with being not able to save new/edited node and warnings disappeared. Creating new image filed allows me to add images and save the node, but warnings appear again:
Notice: Undefined property: stdClass::$field_poster_width ve funkci field_sql_storage_field_storage_load() (řádek: 360 v souboru C:\xampp\htdocs\doc_root\2011_waterski_kopie\modules\field\modules\field_sql_storage\field_sql_storage.module).
Notice: Undefined property: stdClass::$field_poster_height ve funkci field_sql_storage_field_storage_load() (řádek: 360 v souboru C:\xampp\htdocs\doc_root\2011_waterski_kopie\modules\field\modules\field_sql_storage\field_sql_storage.module).
Notice: Undefined property: stdClass::$field_photos_width ve funkci field_sql_storage_field_storage_load() (řádek: 360 v souboru C:\xampp\htdocs\doc_root\2011_waterski_kopie\modules\field\modules\field_sql_storage\field_sql_storage.module).
Notice: Undefined property: stdClass::$field_photos_height ve funkci field_sql_storage_field_storage_load() (řádek: 360 v souboru C:\xampp\htdocs\doc_root\2011_waterski_kopie\modules\field\modules\field_sql_storage\field_sql_storage.module).
Comment #16
xjmFor everyone who is getting these error messages: It would be really helpful if you could provide steps to reproduce the issue.
Comment #17
MrsWho CreditAttribution: MrsWho commentedxjm: I am merely following the update instructions included in the drupal 7.9 download, which I'm including here as reference:
When I got to step 7 I saw the message I included in #10. It really seems to me from my experience and those others listed here that there is some problem with the image field after the update is run. I am now sure what other instructions to provide to reproduce the issue except to have a node with an image, run the update script, and then run cron. That's when I see the error message.
Comment #18
jbrown CreditAttribution: jbrown commentedWhich updates are performed when update.php is run?
Are you running update.php on a snapshot of your db from before 7.9?
If so, it would be really useful for me to examine it and reproduce the problem.
If not, then there is a problem with your database - you need to revert to a backup from before 7.9 and run update.php again.
If there is any problem during the update then you must revert the db to the backup. Once a db has been updated, it must not be run on a previous version on Drupal.
Comment #19
xjm@MrsWho -- Thanks for the followup. Yes, it sounds like there is some problem with something relating to that db upgrade on your site. The issue, however, is reproducing it without a specific site's database. Most people are not getting these messages when they upgrade to 7.9, which means something is different about a few sites to cause this message. It could be a contributed module, or an unidentified bug, or some special configuration, or a failed or incomplete update.
So what I mean is steps for anyone to reproduce the problem -- what you need to set up or configure on a Drupal 7.8 site to make this happen when you upgrade to 7.9. That helps others who do not have the error debug it and fix it.
Comment #20
xjmI tested and the following steps will not reproduce the problem:
The notices in #15 are the notices I get when viewing the article without running update.php, and the PDO exception in #12 is the error I get when attempting to create a new article with an image without running update.php.
Comment #21
xjmThe following steps also will not reproduce the problem:
Nor will these:
In all cases, I got errors like those above if I skipped running update.php. So if you get those errors, try the following:
If you click on the "pending updates" fieldset it should expand to show the following.
There should be no error messages.
If you follow those steps and do not see any error messages, yet the PDO exception still appears, try to find steps that will reproduce the problem from a 7.8 sandbox site, similar to what I posted above. E.g., try setting up a fresh d7.8 site with your content types and fields, and see if that results in the issue. Thank you!
Comment #22
MrsWho CreditAttribution: MrsWho commentedThanks for all your hard work! I'm working on a separate 7.8 install to try to figure out where the problem is. As I was turning on modules, I noticed the PDO exemption suddenly splash across the screen. I believe it was right after I enabled the Google Analytics module, but I'm not completely sure. I tried disabling and then enabling the GA module but it didn't happen again. Will update once I have done more testing.
Comment #23
MrsWho CreditAttribution: MrsWho commentedJbrown, the only update listed when I run update.php is
I am running update.php on a local copy of my site (using the update directions). I'm working on trying to nail down what is the hangup with a sandbox 7.8 version.
Comment #24
lucy CreditAttribution: lucy commentedI don't have Analytics, if it helps you.
Comment #25
xjm@MrsWho -- Alright, so based on that you only have that one update, it sounds like something did not go right with the image update. So the best thing to do would be to revert to the backed up copy of your database and try to run update.php again.
Comment #26
myka CreditAttribution: myka commentedI had this error bugging me for a long time. Seems a lot of people reported it but nobody solved it.
After a bunch of uninstalls, backup installs, downgrades, upgrades, the thing that finally worked is just going into the SQL and adding those fields in manually. They also needed to be added to the _revision table.
So far so good, will post again if it ends up breaking. good luck to others that have this happen!
Comment #27
myka CreditAttribution: myka commentedI had this error bugging me for a long time on http://www.twobitnews.com. Seems a lot of people reported it but nobody solved it.
After a bunch of uninstalls, backup installs, downgrades, upgrades, the thing that finally worked is just going into the SQL and adding those fields in manually. They also needed to be added to the _revision table.
So far so good, will post again if it ends up breaking. good luck to others that have this happen!
Comment #28
kytom CreditAttribution: kytom commentedReverting the database and re-updating didn't fix the issue. Also, I didn't want to just create the columns manually, because they wouldn't get populated as the update does. So I fixed it the other, extremely hacky way.
I pasted the following into my custom module:
from /modules/image/image.install (lines 264-386):
from /modules/field/field.install (lines 309-352):
Then I edited a random page from my existing content, changed its content type to PHP code, and pasted this:
After some trial and error it worked, the fields are there and populated nicely.
Of course remember to remove the above code from the module and change your content back after you're done.
As I'm not a Drupal developer though and just wanted a quick solution, I do not guarantee it will work nor certainly encourage anyone to use this - I'm aware it's probably as dirty as it gets. ;)
(EDIT: Corrected missing code)
Comment #29
joakimekroos CreditAttribution: joakimekroos commentedsubscribing
Comment #30
xjm@joakimekroos:
Thanks!
Comment #31
jbrown CreditAttribution: jbrown commentedJudging by #23 it seems that the db had had the image update function run previously, e.g. by installing a dev version of D7. Then the codebase was reverted to older stable D7. An image field was created. Then the codebase was upgraded again. The image field created in the interval would not have the width and height columns.
Comment #32
jeffschulerA little easier way to do what #28 suggests is:
Comment #33
joakimekroos CreditAttribution: joakimekroos commented#32 solved all my worldly problems. Thanks jeffschuler.
Comment #34
indigoblue CreditAttribution: indigoblue commentedFWIW - I had the same problem in an upgrade from 7.7 to 7.12. Interestingly - all my custom image fields were correctly updated, but the standard field_data_image table was not. ???
For me the easiest fix was to simply create the new fields in the field_data_image table and the corresponding revision table and everything seems OK. When I update the node containing the image - the width & height fields get correctly populated.
Comment #35
tevih CreditAttribution: tevih commentedI had the same issue upgrading to 7.9. I only had 4 nodes with the image field, so I just removed it from the content type and reuploaded my images and that fixed it.
Seems to be an updating issue - I did run update, cleared cache, tried again, and nothing fixed it.
Comment #36
piraxter CreditAttribution: piraxter commentedYes, I have the same but update from Drupal 7.2 to 7.12 :(. To upload pics I install IMCE module and work, but i need to disable the drupal uploader.
Comment #37
tevih CreditAttribution: tevih commentedHere's how I reproduced this issue:
Try updating modules that needed updating.
Begin updating until I get to the database update portion when I get an error that there are dependencies - other core modules needed updating.
I left that screen open, and updated core.
I then clicked "retry" from the previous screen and proceeded updating.
Now I get the same issues previously reported.
Upgrading from 7.9 - 7.12
Comment #38
tevih CreditAttribution: tevih commented@28 - can you give more detail on how you got that to work?
@32 - is there a way to do that without drush?
Comment #39
xjmPlease note that when we say we need steps to reproduce the issue, this means steps for anyone to reproduce the issue, not how you reproduce the issue on your site. So, it should start from "Install Drupal core 7.12" or "Install Drupal core 6.25" or the like.
Comment #40
xjmComment #41
xjmComment #42
js81 CreditAttribution: js81 commentedis there a permanent fix for this? I am still not able to get this to work. my thumbnails are missing and I am seeing the following errors when error logging is enabled:
Notice: Undefined property: stdClass::$field_video_thumbnail in field_sql_storage_field_storage_load() (line 360 of /usr/share/nginx/sites/staging.xxxxx.com_v1/modules/field/modules/field_sql_storage/field_sql_storage.module).
Thanks!
Comment #43
andreak CreditAttribution: andreak commented#32 worked for me on my shopping website. I got this error on every ubercart image after upgrading from 7.8 to 7.12. This fixed it. Many, many thanks!!! -Andrea
Comment #44
dolly nyc CreditAttribution: dolly nyc commentedI had the same error regarding line 360 : Notice: Undefined property: stdClass:: ... (line 360 of .../field_sql_storage.module) after upgrading from 7.8 to 7.15
#32 fixed the problem for me, thanks
Comment #45
BigBrother2010 CreditAttribution: BigBrother2010 commentedI am trying to use Drush but i get following error no matter from which directory i try to use command from comment 32. I am new to Drush so please help.
PDO::__construct(): [2002] No such file or directory (trying to [warning]
connect via unix:///var/mysql/mysql.sock) environment.inc:518
Fatal error: Call to undefined function db_select() in /Users/VedB/Desktop/BeautyRemake/BeautyRemake 1/public_html/modules/field/field.install on line 330
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined function db_select() in
/Users/VedB/Desktop/BeautyRemake/BeautyRemake
1/public_html/modules/field/field.install, line 330
Comment #46
Paulraj Augustin CreditAttribution: Paulraj Augustin commentedI upgraded a Drupal 6 site to Drupal 7. After upgrading, everything works fine. I had migrated all the content types and content. I am able to view all the content.
When I edit or add a content which contains an image field, I get the following error:
I came to know that field_image_alt is not found.
I had tried the solution stated in #32 comment, but i got the error as
How can i add those fields ? Anyone Please help me. Thanks in advance.