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 the errors. For more information about which values are valid for different metafields, refer to the list of common metafield content types and values.
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.
- Optional: Hover your cursor over the
iicon next to a metafield value to view the error that's associated with it.
- 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
shiftkey and click another cell.
- To select multiple cells that aren't adjacent, hold the
Altkey on a PC or the
commandkey 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.
- 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
If any metafield values still display errors, then repeat this process until all values are fixed. You can't use your metafield until all 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.