stencil-cli icon indicating copy to clipboard operation
stencil-cli copied to clipboard

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

Open 34638a opened this issue 1 year ago • 1 comments

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 avatar Sep 11 '24 10:09 34638a

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

34638a avatar Sep 25 '24 08:09 34638a