Strange metafield behaviour

Erwin4
Tourist
9 0 14

So I have a definition of a metafield on a product. It is a single line text field. No restrictions.

When I use the REST API to populate these fields with a simple table html code, the field has the code stored in it but it won't show on the front page using product.metafields.custom.myfield.value. It just shows blank even though the field is populated with basic html in the admin.

Now the strange thing: when I go to the product in the admin, copy the metafield content, clear the field, save the product, paste back the metafield, save again, it DOES show up in the front end!

So, uploading html content into a metafield: does not work, manually typing the same html into a metafield: works.

Reply 1 (1)
EasifyApps-Zoe
Shopify Partner
581 13 34

Hi @Erwin4,

Next time you're looking to add another text field to the product page, I suggest trying out the free Easify Product Options app. It's a quick and easy setup, no coding required, and it works like a charm 🤗.

 

EasifyAppsZoe_0-1695927619952.png

 

EASIFY - MAKING SHOPIFY SIMPLE & SWEET!
Easify Product Options: Create custom product options 10X faster & easier!
Easify Product Attachments: Effortlessly add downloadable PDF files (or any other format) to Shopify pages!
Try for Free | 24/7 Live Chat Support