Similar to #2939324: Numeric value out of range: 1264 Out of range value for column [error] 'shopify_collection_id_value' at row 1, which addresses this issue for the D7 branch. Opening a separate issue so we can work on the D7 and D8 fixes in parallel, rather than hijacking that issue with a D8 patch.

Also split off from #2945205: Drupal\Core\Entity\EntityStorageException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'inventory_quantity' at row 1, which started as a similar issue on the inventory quantity property, but later on included a (partial) fix for the shopify collection ID field. Since these are two separate items (one is about the quantity base field on the shopify_product_variant entity, the other is about the shopify_collection_id configurable field on taxonomy terms), I think it's preferable to handle them in separate issues.

The fix for the collections in #2945205: Drupal\Core\Entity\EntityStorageException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'inventory_quantity' at row 1 was only a partial fix: it addresses main field table, but not the revision table, and does not use the proper API to update the tables (directly alters the database structure instead of using the Update API (#3029997: New Entity Update API for converting the schema of a content entity type, with or without pre-existing data).

Attached patch should properly address the change to the shopify_collection_id field.

Comments

mr.baileys created an issue. See original summary.

bobbygryzynger’s picture

Moves the post-update hook to a shopify.post_update.php file to prevent patch conflicts.

  • bobbygryzynger authored f1b33f0 on 8.x-1.x
    Issue #3082282 by bobbygryzynger, mr.baileys: Cannot sync/import...
bobbygryzynger’s picture

Status: Needs review » Fixed
bobbygryzynger’s picture

Status: Fixed » Needs review
StatusFileSize
new2.99 KB
new2.88 KB

Still seeing an issue here in a site status report:

The taxonomy_term.field_shopify_collection_id field needs to be updated.

The attached patch also updates the site's configuration object for the field and moves the database storage updates back to a hook_update_N function (where it was in the original patch).

bobbygryzynger’s picture

Setting storage to unsigned as well to match installation configuration.

bobbygryzynger’s picture

Updates hook function label.

  • bobbygryzynger authored 3dc1f7e on 8.x-1.x
    Issue #3082282 by bobbygryzynger, mr.baileys: Cannot sync/import...
bobbygryzynger’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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