Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
When I try to create or update metaobject entry, I got error in shopify admin page.
But I could create by Shopify admin API (by curl).
UI error is this:
Error creating metaobject
An unknown error occurred
And dev tool error is this:
templateSuffix can't be blank
And dev tool request variables are these:
So with these, I can see that in request variables to metaobjectCreate from admin page, templateSuffix is empty.
So if I change templateSuffix to other than default, then I can solve this.
But I want to use default liquid template for this metaobject entry.
And before, there was not like this error.
I want to know why this can happen and how to solve this.
Thank you.
Solved! Go to the solution
This is an accepted solution.
Thank you.
With two devices and other browser I tried this.
I'm gonna send error details.
Request URL: https://admin.shopify.com/api/shopify/{myshopify}?operation=MetaobjectCreate&type=mutation
Request payload:
{"operationName":"MetaobjectCreate","variables":{"input":{"handle":"hoge","capabilities":{"publishable":{"status":"ACTIVE"},"onlineStore":{"templateSuffix":""}},"fields":[{"key":"pid","value":"hoge"},{"key":"display_name","value":"hoge"},{"key":"profile_image","value":""},{"key":"sns_urls","value":""},{"key":"description","value":""},{"key":"room_layout","value":"1DK"},{"key":"products_using_in_partner_coordinates","value":""}],"type":"partner"}},"extensions":{"client_context":{"page_view_token":"ca6ab033-8a94-4768-b006-5607dc78de75","client_route_handle":"metaobject_entry:new","client_pathname":"/store/n213t/content/metaobjects/entries/partner/new","client_normalized_pathname":"/store/:storeHandle/content/metaobjects/entries/:type/new","shopify_session_token":"a99c19ec-87a3-4032-8004-08be953e0126","shopify_multitrack_token":"61caa616-C228-49F8-B920-29D6449B87FB"}},"query":"mutation MetaobjectCreate($input: MetaobjectCreateInput!) {\n metaobjectCreate(metaobject: $input) {\n metaobject {\n ...MetaobjectThumbnailFieldFragment\n id\n displayName\n __typename\n }\n userErrors {\n field\n code\n message\n elementIndex\n elementKey\n __typename\n }\n __typename\n }\n}\n\nfragment MetaobjectThumbnailFieldFragment on Metaobject {\n definition {\n id\n type\n name\n hasThumbnailField\n __typename\n }\n thumbnailField {\n type\n thumbnail {\n hex\n file {\n id\n alt\n preview {\n status\n image {\n id\n thumbnail: url(transform: {maxWidth: 100})\n altText\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n}\n"}
Response:
{
"errors": [
{
"message": "templateSuffix can't be blank",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"metaobjectCreate"
],
"extensions": {
"code": "INVALID_FIELD_ARGUMENTS"
}
}
],
"data": {
"metaobjectCreate": null
},
"extensions": {
"cost": {
"requestedQueryCost": 16,
"actualQueryCost": 1,
"throttleStatus": {
"maximumAvailable": 20000.0,
"currentlyAvailable": 19999,
"restoreRate": 1000.0
}
}
}
}
This is an accepted solution.
It fixed today.
Maybe just Shopify's error.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025