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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

syodash’s picture

After 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.

jbrown’s picture

You need to run update.php after updating core.

syodash’s picture

I 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.

syodash’s picture

FileSize
299.25 KB
434.48 KB
xjm’s picture

#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?

syodash’s picture

Try 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.

jbrown’s picture

In #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.

MrsWho’s picture

I 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).

jbrown’s picture

Can you provide more information? Does status report say you still have database updates?

MrsWho’s picture

I 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:

Warning: Drupal core update status  No update data available
No update information available. Run cron or check manually.

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.

catch’s picture

Status: Active » Postponed (maintainer needs more info)

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.

Is 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?

MrsWho’s picture

I 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:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_picture_width' in 'field list': INSERT INTO {field_data_field_picture} (entity_type, entity_id, revision_id, bundle, delta, language, field_picture_fid, field_picture_alt, field_picture_title, field_picture_width, field_picture_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] => 9 [:db_insert_placeholder_2] => 9 [:db_insert_placeholder_3] => staff_page [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 28 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => 181 [:db_insert_placeholder_10] => 264 ) in field_sql_storage_field_storage_write() (line 448 of C:\wamp\www\fwbpress\modules\field\modules\field_sql_storage\field_sql_storage.module).
bcjmpr’s picture

Same 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.

MrsWho’s picture

I'm glad you've got everything working bcjmpr, though even after running update.php and cron I have nothing.

lucy’s picture

I 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).

xjm’s picture

For everyone who is getting these error messages: It would be really helpful if you could provide steps to reproduce the issue.

MrsWho’s picture

xjm: I am merely following the update instructions included in the drupal 7.9 download, which I'm including here as reference:

1. Log in as a user with the permission "Administer software updates".

2. Go to Administration > Configuration > Development > Maintenance mode.
Enable the "Put site into maintenance mode" checkbox and save the
configuration.

3. Remove all old core files and directories, except for the 'sites' directory
and any custom files you added elsewhere.

4. Download the latest Drupal 7.x release from http://drupal.org to a
directory outside of your web root. Extract the archive and copy the files
into your Drupal directory.

5. Re-apply any modifications to files such as .htaccess or robots.txt.

6. Run update.php by visiting http://www.example.com/update.php (replace
www.example.com with your domain name). This will update the core database
tables.

7. Go to Administration > Reports > Status report. Verify that everything is
working as expected.

8. Ensure that $update_free_access is FALSE in settings.php.

9. Go to Administration > Configuration > Development > Maintenance mode.
Disable the "Put site into maintenance mode" checkbox and save the
configuration.

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.

jbrown’s picture

Which 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.

xjm’s picture

@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.

xjm’s picture

I tested and the following steps will not reproduce the problem:

  1. Install Drupal 7.8 with the standard profile.
  2. Create an article with an image attachment.
  3. Place the site in maintenance mode.
  4. Upgrade the codebase to 7.9.
  5. Run update.php.
  6. Create a new article with a new image.

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.

xjm’s picture

Category: bug » support
Priority: Major » Normal
FileSize
11.17 KB
7.19 KB
5.32 KB
18.95 KB

The following steps also will not reproduce the problem:

  1. Install 7.8/standard.
  2. Create a custom content type.
  3. Add a new image field to that content type and configure it for unlimited allowed values.
  4. Create a custom content node with two image attachments.
  5. Upgrade the codebase to 7.9.
  6. Run update.php.

Nor will these:

  1. Install 7.8/standard.
  2. Add a new image field to the page content type and configure it for two allowed values and a default image.
  3. Create a page node with two image attachments.
  4. Upgrade the codebase to 7.9.
  5. Run update.php.

In all cases, I got errors like those above if I skipped running update.php. So if you get those errors, try the following:

  1. Revert to your backed up copy of your database from before the upgrade. (This is important.)
  2. Log in as user 1.
  3. Update your codebase to 7.9 if you haven't already.
  4. Visit http://mysite.com/update.php. You should see this:
    first-screen.png
  5. Click the Continue button. You should see this:
    apply.png
    If you click on the "pending updates" fieldset it should expand to show the following.
    pending.png
  6. Click the Apply pending updates button. The updates will run, and after they are done you should see this:
    attempted.png
    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!

MrsWho’s picture

Thanks 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.

MrsWho’s picture

Jbrown, the only update listed when I run update.php is

1 Pending Update

Comment Module
7009 - Change the last_comment_timestamp column description.

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.

lucy’s picture

I don't have Analytics, if it helps you.

xjm’s picture

@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.

myka’s picture

I 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!

myka’s picture

I 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!

kytom’s picture

Title: Unknown column 'field_image_width' on Drupal 7.8 to 7.9 upgrade » Error generated after updating from Drupal 7.8 to 7.9

Reverting 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):

/**
 * Add width and height columns to a specific table.
 *
 * @param $table
 *   The name of the database table to be updated.
 * @param $columns
 *   Keyed array of columns this table is supposed to have.
 */
function _image_update_7002_add_columns($table, $field_name) {
  $spec = array(
    'type' => 'int',
    'unsigned' => TRUE,
  );

  $spec['description'] = 'The width of the image in pixels.';
  db_add_field($table, $field_name . '_width', $spec);

  $spec['description'] = 'The height of the image in pixels.';
  db_add_field($table, $field_name . '_height', $spec);
}

/**
 * Populate image dimensions in a specific table.
 *
 * @param $table
 *   The name of the database table to be updated.
 * @param $columns
 *   Keyed array of columns this table is supposed to have.
 * @param $last_fid
 *   The fid of the last image to have been processed.
 *
 * @return
 *   The number of images that were processed.
 */
function _image_update_7002_populate_dimensions($table, $field_name, &$last_fid) {
  // Define how many images to process per pass.
  $images_per_pass = 100;

  // Query the database for fid / URI pairs.
  $query = db_select($table, NULL, array('fetch' => PDO::FETCH_ASSOC));
  $query->join('file_managed', NULL, $table . '.' . $field_name . '_fid = file_managed.fid');

  if ($last_fid) {
    $query->condition('file_managed.fid', $last_fid, '>');
  }

  $result = $query->fields('file_managed', array('fid', 'uri'))
    ->orderBy('file_managed.fid')
    ->range(0, $images_per_pass)
    ->execute();

  $count = 0;
  foreach ($result as $file) {
    $count++;
    $info = image_get_info($file['uri']);

    if (is_array($info)) {
      db_update($table)
        ->fields(array(
          $field_name . '_width' => $info['width'],
          $field_name . '_height' => $info['height'],
        ))
        ->condition($field_name . '_fid', $file['fid'])
        ->execute();
    }
  }

  // If less than the requested number of rows were returned then this table
  // has been fully processed.
  $last_fid = ($count < $images_per_pass) ? NULL : $file['fid'];
  return $count;
}

/**
 * Add width and height columns to image field schema and populate.
 */
function image_update_7002(array &$sandbox) {
  if (empty($sandbox)) {
    // Setup the sandbox.
    $sandbox = array(
      'tables' => array(),
      'total' => 0,
      'processed' => 0,
      'last_fid' => NULL,
    );

    $fields = _update_7000_field_read_fields(array(
      'module' => 'image',
      'storage_type' => 'field_sql_storage',
      'deleted' => 0,
    ));

    foreach ($fields as $field) {
      $tables = array(
        _field_sql_storage_tablename($field),
        _field_sql_storage_revision_tablename($field),
      );
      foreach ($tables as $table) {
        // Add the width and height columns to the table.
        _image_update_7002_add_columns($table, $field['field_name']);

        // How many rows need dimensions populated?
        $count = db_select($table)->countQuery()->execute()->fetchField();

        if (!$count) {
          continue;
        }

        $sandbox['total'] += $count;
        $sandbox['tables'][$table] = $field['field_name'];
      }
    }

    // If no tables need rows populated with dimensions then we are done.
    if (empty($sandbox['tables'])) {
      $sandbox = array();
      return;
    }
  }
  // Process the table at the top of the list.
  $table = reset(array_keys($sandbox['tables']));
  $sandbox['processed'] += _image_update_7002_populate_dimensions($table, $sandbox['tables'][$table], $sandbox['last_fid']);

  // Has the table been fully processed?
  if (!$sandbox['last_fid']) {
    unset($sandbox['tables'][$table]);
  }

  $sandbox['#finished'] = count($sandbox['tables']) ? ($sandbox['processed'] / $sandbox['total']) : 1;
}

from /modules/field/field.install (lines 309-352):

/**
 * Utility function: fetch all the field definitions from the database.
 *
 * Warning: unlike the field_read_fields() API function, this function returns
 * all fields by default, including deleted and inactive fields, unless
 * specified otherwise in the $conditions parameter.
 *
 * @param $conditions
 *   An array of conditions to limit the select query to.
 * @param $key
 *   The name of the field property the return array is indexed by. Using
 *   anything else than 'id' might cause incomplete results if the $conditions
 *   do not filter out deleted fields.
 *
 * @return
 *   An array of fields matching $conditions, keyed by the property specified
 *   by the $key parameter.
 */
function _update_7000_field_read_fields(array $conditions = array(), $key = 'id') {
  $fields = array();
  $query = db_select('field_config', 'fc', array('fetch' => PDO::FETCH_ASSOC))
    ->fields('fc');
  foreach ($conditions as $column => $value) {
    $query->condition($column, $value);
  }
  foreach ($query->execute() as $record) {
    $field = unserialize($record['data']);
    $field['id'] = $record['id'];
    $field['field_name'] = $record['field_name'];
    $field['type'] = $record['type'];
    $field['module'] = $record['module'];
    $field['active'] = $record['active'];
    $field['storage']['type'] = $record['storage_type'];
    $field['storage']['module'] = $record['storage_module'];
    $field['storage']['active'] = $record['storage_active'];
    $field['locked'] = $record['locked'];
    $field['cardinality'] = $record['cardinality'];
    $field['translatable'] = $record['translatable'];
    $field['deleted'] = $record['deleted'];

    $fields[$field[$key]] = $field;
  }
  return $fields;
}

Then I edited a random page from my existing content, changed its content type to PHP code, and pasted this:

$sandbox = array();
image_update_7002($sandbox);

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)

joakimekroos’s picture

subscribing

xjm’s picture

Title: Error generated after updating from Drupal 7.8 to 7.9 » Unknown column 'field_image_width' on Drupal 7.8 to 7.9 upgrade

@joakimekroos:

  1. You don't need to "subscribe" anymore. There's a green "Follow" button you can use in the upper-right corner of the issue.
  2. This particular issue is currently postponed, because we do not have a set of steps to reproduce this issue. For a solution to be found, we probably need someone to provide some steps to reproduce, starting from either "Install Drupal 6.22" or "Install Drupal 7.8." See #21.

Thanks!

jbrown’s picture

Title: Error generated after updating from Drupal 7.8 to 7.9 » Unknown column 'field_image_width' on Drupal 7.8 to 7.9 upgrade

Judging 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.

jeffschuler’s picture

A little easier way to do what #28 suggests is:

$ drush php-eval 'include "modules/field/field.install"; include "modules/image/image.install"; $sandbox = array(); image_update_7002($sandbox);'
joakimekroos’s picture

#32 solved all my worldly problems. Thanks jeffschuler.

indigoblue’s picture

FWIW - 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.

tevih’s picture

I 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.

piraxter’s picture

Yes, 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.

tevih’s picture

Status: Postponed (maintainer needs more info) » Active

Here'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

tevih’s picture

@28 - can you give more detail on how you got that to work?
@32 - is there a way to do that without drush?

xjm’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs steps to reproduce

Please 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.

xjm’s picture

xjm’s picture

Issue tags: +Upgrade path
js81’s picture

is 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!

andreak’s picture

#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

dolly nyc’s picture

I 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

BigBrother2010’s picture

I 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

Paulraj Augustin’s picture

I 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:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_image_alt' 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)

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

PHP Fatal error: Call to undefined function db_select() in /var/www/test/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 /var/www/test/modules/field/field.install, line 330

How can i add those fields ? Anyone Please help me. Thanks in advance.

Version: 7.9 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.