My custom metafields for products seem to be changing by themselves.
I have various product-level metafields set up on my store. They contain product-specific data such as a link to sizing advice for the product, and a very short description of the product, which is output onto product pages using a custom liquid section on the product page template. When a product is created, they get set, and all seemed well.
Over the past few weeks, though, they’ve started to change and be set to the wrong values. The value is always a valid value that seems to have been inadvertantly copied from another product, ie, the very-short-description for a Penny Loafer will end up being set to ‘Plain Zip Boot’.
I went through all our products a while ago, corrected all these issues, and checked that everything was correct. I chalked it up to my colleagues maybe cloning a product to make another product when we set the store up, and forgetting to set the custom metafields.
But it has happened again! These custom metafields are being set to values from other products. I have spoken to everyone who works on the store and they all swear blind they’re doing nothing but updating inventory, they are not messing with product data. I have no Flows set up that might cause this.
The metafields are literally just text that we type in, that’s all.
I’m at my wit’s end. Has anyone had anything similar happen? Is there any way of ‘locking’ metafields? What other vectors are there for custom metafields to be changed other than the product admin page?
Any help appreciated, thank you.
G
PS: no ‘buy this app’ requests or sales pitches from contractors, please.
Can only assume this is some browser issue, copying a saved value over the top of the existing value when someone does an unrelated edit on a shoe.
Restricting edit access did not work, but the answer above set me down the right path so accepted that one.
Have had to work around this as follows:
make a copy of the metafield that’s being changed, and unpin it from favourites so it doesn’t appear on the product edit view. Call it check-field or whatevs
when your main metafield (main-field) is in a known-good state, set up a shopify flow that copies the values from main-field to check-field. Schedule that to run about an hour before the beginning on the work day
set up a shopify flow that copies from check-field back into main-field. Schedule that to run about an hour after the end of the working day
This effectively backs up your correct values. If they get changed during the day by whatever the hell this bug is, then they’ll be corrected at the end of the day.
Let your staff know that if main-field needs changing, they need to let you know. Edit both the values using the bulk edit tool.
What a complete faff to fix something that should not have been a problem in the first place.
We’ve been having a similar situaton for over a year with things changing on their own.
I have to go through our website constantly to make sure items are not dropping off of it.
A couple of weeks ago I noticed Shopify had changed the placement for the toolbar for
creating shipping labels, printing, etc
The photo below is the toolbar and it’s no longer where it used to be.
Then we had items being duplicated within our store.
I wish they would just leave things alone if it’s working correctly.
And IF they are going to change things send a notice out to their
customers.
Unpinning is the only thing I’ve found that helps with this.
It’s truly infuriating. In our latest shopify project we save a custom identifier in a metafield which uniquely identifies the product so that we can sync with our backoffice systems using graphQL, if Shopify decides to randomly update that one, it’s going to cause absolute chaos.
Hi @dartacus , thanks for clarifying and pointing out to the right solution!
It didn’t cross my mind that this could be a state management issue, as logically Shopify should always clear the whole state for a product even though it has custom fields.
Unpinning solves the issue, makes things a bit cumbersome but usually, for us at least, they are changed rarely after the product has been created.
@tim_tairli - we’re not entirely sure whether two conflicting edits from two different people was needed or not. What I suspect was happening was that a user would open a product to adjust inventory or whatevs. The metafield value would be displayed below. Then the user navigates to a different product to do some work there. The metafield value from the previous product was then loaded over the top of the metafield value for the current product via iffy state retention or browser interference or some other cock up. When the user saved their changes on the product, the value was overwritten in the shopify DB.
We’re lucky - all our metafield values are set via graphQL or at least in bulk using the bulk editor. We just unpinned everything that was critical.