Deleted Product Metafields Outputting Integers onto Page

joelrevans
New Member
2 0 0

We're currently constructing a custom product page template that relies on metafields to flesh out certain product data. We embed the content straight onto the page and it works well to display our product attributes. We have recently run into an interesting bug in which deleted metafields continue to return values after they're deleted; values that are unrelated to the original content. We have a "size" metafield that, following deletion on a product, outputs "11" or "9". We have never used numbers to describe the sizes of our products (Small, Medium, Large), and I'm curious what might be driving this behavior, or if it is perhaps a bug.

We do not use metafields on any of our collections, product variants, or pages. We are using Metafields Guru and Advanced Custom Fields to verify that the fields are deleted.

What follows is an example of our metafield embed code for a particular product followed by its output:

<section>
    <h4>Name</h4>
    <p>{{product.metafields.testbrand.short_name}}</p>
</section>
<section>
    <h4>Color</h4>
    <p>{{product.metafields.testbrand.color}}</p>
</section>
<section>
    <h4>Size</h4>
    <p>{{product.metafields.testbrand.size}}<!--Field is deleted, it should return an empty string--></p>
</section>

 

<section>
    <h4>Name</h4>
    <p>Test product number one</p>
</section>
<section>
    <h4>Color</h4>
    <p>Obnoxiously Aquamarine</p>
</section>
<section>
    <h4>Size</h4>
    <p>11<!--Field is deleted, it should return an empty string--></p>
</section>

 

0 Likes
patrickb
Shopify Expert
27 0 4

Hey did you ever get this resolved?

Recipe Kit - Easy, beautiful & SEO friendly recipe cards on your Shopify blog posts - https://apps.shopify.com/recipe-kit
Wait.li - Product Waiting Lists for Shopify - https://apps.shopify.com/product-waiting-lists
0 Likes
joelrevans
New Member
2 0 0

We did not. Our workaround was to hardcode a blacklist that removes all numerical values from the metafields.

0 Likes