Fixing metafield validation errors

After you migrate existing metafields to a definition, you can use the bulk editor to fix any metafield values that don't match your custom definition. You're automatically redirected to the bulk editor on the Invalid metafield values page after you create a definition that has invalid values.

The Invalid metafield values page displays the validation rules for your metafield definition and a table that contains the following information:

  • the parts of your store that have an invalid value for your metafield definition
  • a description of the error for each metafield value
  • an editable column where you can enter new values for your metafields

If some of your metafield values are invalid, then you can't use your metafield until you fix all of the errors. For more information about which values are valid for different metafields, refer to the list of metafield content types.

Fix metafield values by using the bulk editor

If you create a custom metafield definition that contains invalid values, then you're automatically redirected to the bulk editor to fix the validation errors.

Steps:

  1. Optional: Hover your cursor over the i icon next to a metafield value to view the error that's associated with it.
  2. Click and type within fields in the METAFIELD VALUE column to edit the existing values. To update multiple values at the same time, use the following shortcuts:
    • To select and edit multiple fields at the same time, click and drag your cursor across multiple cells.
    • To select multiple adjacent cells, click to select a cell, then hold the shift key and click another cell.
    • To select multiple cells that aren't adjacent, hold the Alt key on a PC or the command key on a Mac and click different cells.
    • To apply the value of a cell to the cells below it, click and drag the cell's fill handle across the cells below.
  3. Click Save.

After you save your changes, the table of metafield values displays the following updated statuses:

  • All metafield values that match your metafield definition display a checkmark.
  • Any metafield values that still need to be fixed display the i icon.

If any metafield values still display errors, then repeat this process until all values are fixed. You can't use your metafield until all of the values match your metafield definition.

If you don't fix your invalid values right away, then metafield definitions with invalid values display a Fixes needed error message on the Metafield definitions page. You can click View invalid metafields to return to the bulk editor.

Ready to start selling with Shopify?

Try it free