Metaobject create or update error in shopify admin page

Solved

Metaobject create or update error in shopify admin page

Taichi-S
Shopify Partner
10 1 1

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

TaichiS_0-1747753692263.png

 

And dev tool error is this:

templateSuffix can't be blank

And dev tool request variables are these:

スクリーンショット 2025-05-20 22.11.16.png

 

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.

Accepted Solution (1)

Taichi-S
Shopify Partner
10 1 1

This is an accepted solution.

It fixed today.

 

Maybe just Shopify's error.

View solution in original post

Replies 2 (2)
Taichi-S
Shopify Partner
10 1 1

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
            }
        }
    }
}

Taichi-S
Shopify Partner
10 1 1

This is an accepted solution.

It fixed today.

 

Maybe just Shopify's error.