bigcommerce / stencil-cli

BigCommerce Stencil emulator for local theme development
https://developer.bigcommerce.com/stencil-docs
BSD 4-Clause "Original" or "Old" License
101 stars 141 forks source link

Intermittent Fault: Missing "custom_fields" field from "product" Stencil Object when rendering product page. #1229

Open 34638a opened 2 months ago

34638a commented 2 months ago

Expected behavior

https://developer.bigcommerce.com/docs/storefront/stencil/themes/context/object-reference/schemas#product As per documentation of Stencil Object, there should always be present a field "custom_fields" present on the product object.

Actual behavior

Intermittant fault, the field "custom_fields" is left undefined

Results in console from calling to handlebars {{log product}} { num_reviews: 0, sku: null, url: '...Omitted...', add_this: [ { service: 'email', annotation: '' }, { service: 'print', annotation: '' } ], gtin: null, brand: { ...Omitted... }, options: [ ...Omitted... ], id: '12050', can_purchase: true, meta_description: '', category: [], AddThisServiceButtonMeta: '', main_image: null, add_to_wishlist_url: '/wishlist.php?action=add&product_id=12050', description: '...Omitted...', tags: [], warranty: '', price: { with_tax: { formatted: '$6.95', value: 6.95, currency: 'AUD' }, tax_label: 'GST or Overseas freight handling charge', price_range: { min: [Object], max: [Object] } }, detail_messages: '', availability: '', page_title: '...Omitted...', cart_url: '...Omitted...', max_purchase_quantity: 0, mpn: null, upc: null, shipping_messages: [], rating: 0, reviews: { ...Omitted... }, bulk_discount_rates: [], meta_keywords: '', show_quantity_input: 1, title: 'Test Product', gift_wrapping_available: false, min_purchase_quantity: 0, customizations: [], images: [] }

Result from {{log product.custom_fields}} undefined

Steps to reproduce behavior

Unknown, fault cause indeterminate.

Environment

Windows 10, Node 20, Latest version 8.2 of Stencil CLI. Fault has existed previous to current. Issue not found in production. Only in local.

34638a commented 1 month ago

Just a brief check in on this issue to see if anyone else is having these kind of issues?