Hi Rszrama and Commerce team-

Just updated to Drupal 7.12 and Commerce 7x 1.2 and got this warning message and a notice-

Warning: array_keys() [function.array-keys]: The first argument should be an array in drupal_schema_fields_sql() (line 6842 of /home1/centerq8/public_html/includes/common.inc).

and

Notice: Undefined property: stdClass::$field_slideshow_image_height in field_sql_storage_field_storage_load() (line 360 of /home1/centerq8/public_html/modules/field/modules/field_sql_storage/field_sql_storage.module).

Notice: Undefined property: stdClass::$field_slideshow_image_width in field_sql_storage_field_storage_load() (line 360 of /home1/centerq8/public_html/modules/field/modules/field_sql_storage/field_sql_storage.module).

these warnings and notices did not come until after Commerce update.

The interesting thing is - on the page for the slideshow image width and height notice- there is not slideshow on the page that the Drupal log references via link = so I have no idea what this notice refers to

Not sure what they mean but wanted to let you know.

Thanks for all the great work!

Aaron

CommentFileSizeAuthor
#15 warning_screenshot.jpg33.77 KBpygmalia

Comments

AimAdvantage’s picture

Additional error showed when trying to develop a view of some book products already in the commerce db -

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS commerce_product_, commerce_product.title AS commerce_product_title, '' AS fi' at line 1

Does this need to be posted somewhere else?

Thanks
Aaron

AimAdvantage’s picture

Also now getting this message for commerce_price.module -

Notice: Undefined index: amount in commerce_price_field_formatter_view() (line 397 of /home1/centerq8/public_html/sites/all/modules/commerce/modules/price/commerce_price.module).

AimAdvantage’s picture

Uh oh. . .
======

Just making a log here of error messages-

now i tried to go into old book product and simply save it without making any changes to see if it would update price field through ADMIN UI and got this -

--------

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_book_thumb_width' in 'field list': INSERT INTO {field_data_field_book_thumb} (entity_type, entity_id, revision_id, bundle, delta, language, field_book_thumb_fid, field_book_thumb_alt, field_book_thumb_title, field_book_thumb_width, field_book_thumb_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] => commerce_product [:db_insert_placeholder_1] => 5 [:db_insert_placeholder_2] => 8 [:db_insert_placeholder_3] => book [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 65 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => 125 [:db_insert_placeholder_10] => 181 ) in field_sql_storage_field_storage_write() (line 448 of /home1/centerq8/public_html/modules/field/modules/field_sql_storage/field_sql_storage.module)

=============

It looks like earlier version created a thumbnail width and height column that is now not being found by new Commerce code for each book product that I previously built and these two missing or non-integrating width and height fields are now corrupting the current site.

Any thoughts on how to fix this -

It appears that it has something to do with height and width in un-findable database column from the first message I posted above. . . copied here again

Notice: Undefined property: stdClass::$field_slideshow_image_height in field_sql_storage_field_storage_load() (line 360 of /home1/centerq8/public_html/modules/field/modules/field_sql_storage/field_sql_storage.module).

Notice: Undefined property: stdClass::$field_slideshow_image_width in field_sql_storage_field_storage_load() (line 360 of /home1/centerq8/public_html/modules/field/modules/field_sql_storage/field_sql_storage.module).

damien tournoud’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

Have you ran update.php? Was is successful?

AimAdvantage’s picture

Category: support » bug
Status: Postponed (maintainer needs more info) » Active

Update-

Before updating to current Commerce Version - I had created a product type called "book"

then I created the specific fields for book -which included a thumbnail of the book image.

When I updated to commerce 7.x-1.2 I got all these errors in succession.

However- when I removed the images from the actual product listings then the errors disappeared.

Going to re-build the product type "book" with this installation and then rebuild the 4 books that are in the store and see if it will build the product type properly and include image for the book without having DB issues - perhaps it is not recognizing a DB column that was built in previous version of commerce.

will post results

AimAdvantage’s picture

OK-

I had a sample order of some books as Admin and it would not allow me to delete the book product until I deleted all orders with that book in it.

AimAdvantage’s picture

Ok- after deleting the orders that were pending- I was able to delete the book products.

AimAdvantage’s picture

Deleted just the book image thumb field from product type "book"

AimAdvantage’s picture

re-created field "field_book_thumb" of type image using media selector to choose the image (with no default book image added)

AimAdvantage’s picture

so far so good- rebuilt the book products after deleting the image field from DB that was not being recognized by Commerce update code. No errors yet after rebuilding books.

Going to build different views for books in views to see if error re-occurs

AimAdvantage’s picture

Ok- rebuilding of product type field where the book image file was in the DB was causing the problems listed above.

Because I only had 4 books loaded into this store - it was not too much work to fix this.

However- would this be a problem or would there be a better fix for these errors if someone had a shopping cart built with hundreds of products with a faulty image field?

Will continue to post progress here - but there still seems to be an error with new Drupal Commerce referencing a specific product type field that had an image height and width problem accessing the old database schema for this field that was built in previous Commerce.

Any thoughts would be appreciated.

Thanks
Aaron

AimAdvantage’s picture

I did actually after each install.

I usually do 1 update at a time and run update php incase I run into a specific bug- easier to track.

But with the first update php I received the notice that it could not reference the db column which referred to the height and width of the image file field I had established on the book product type.

It is all apparently working fine now because I rebuilt the product type so apparently this built the necessary sql column because it is working fine now.

My only concern is that this could be an issue or hidden bug that might affect our commerce site or another's in the future so I posted the bug as well as I could so a more advanced coder could see if it was a true bug.

Thanks
Aaron

amateescu’s picture

Title: Drupal 7.12 and Commerce 7x 1.2 Warning message » Warning message after upgrading to Drupal 7.12 and Commerce 7.x-1.2
Category: bug » support
Status: Active » Postponed (maintainer needs more info)

No 'advanced coder' can check if this is a bug or something specific to your setup untill you can provide some simple and clear steps for reproducing the issue :)

Something like:
1. install Drupal 7.X and Drupal Commerce 7.x-1.Y. No other contrib modules!!
2. add field of type X to a product of type Y
...
N. upgrade to ... first and then to ...

pygmalia’s picture

Component: Other » Commerce

Same problem here:
Commerce 7.x-1.2 upgrade on Drupal core 7.12
Other modules previously installed:
• CTools 7.x-1.0
• Address Field 7.x-1.0-beta2
• Entity API 7.x-1.0-rc1
• Entity tokens 7.x-1.0-rc1
• Rules 7.x-2.0
• Views 7.x-3.1
No products yet, a clean install using Kickstart last week, no problems then.
The database update triggers the warning.

Any code line substitutions for common.inc?

pygmalia’s picture

StatusFileSize
new33.77 KB

screenshot of the warning message attached

freescholar’s picture

Title: Warning message after upgrading to Drupal 7.12 and Commerce 7.x-1.2 » GONE - Warning message after upgrading to Drupal 7.12 and Commerce 7.x-1.2
Status: Postponed (maintainer needs more info) » Needs review

I upgraded to the dev version of Drupal Commerce and the error went away.
http://drupal.org/project/commerce

THANK YOU COMMERCE GUYS!

pixelsweatshop’s picture

Just flushing cache one extra time seemed to do it for me. (Didn't have to run the latest dev)

amateescu’s picture

Title: GONE - Warning message after upgrading to Drupal 7.12 and Commerce 7.x-1.2 » Warning message after upgrading to Drupal 7.12 and Commerce 7.x-1.2
Version: 7.x-1.2 » 7.x-1.x-dev
Status: Needs review » Fixed

Let's call it fixed then :)

Status: Fixed » Closed (fixed)

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