A space to discuss online store customization, theme development, and Liquid templating.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi, I'm facing a very strange problem that I can't seem to figure out.
I'm trying to make a plugin to insert 2 collection scripts in the current Shopify theme, but every time I get the "Not found" error, but all the inputs are correct, I also checked the theme id and the path of an asset and everything OK
const test = await shopify.api.rest.Asset.all({session: session, theme_id: theme.id, asset: {"key": "layout/theme.liquid"}});
const asset = new shopify.api.rest.Asset({session: session});
asset.theme_id = test.data[0].theme_id;
asset.key = "layout/theme.liquid";
asset.value = "<img src='backsoon-postit.png'><p>We are busy updating the store for you and will be back within the hour.</p>";
await asset.save({
update: true,
});
My response
2023-05-10 06:11:17 │ backend │ HttpResponseError: Received an error response (404 Not Found) from Shopify:
2023-05-10 06:11:17 │ backend │ "Not Found"
Hello,
I have exactatly the same problem, did you found an issue?
I have the same issue can you find any kind of solution @RecomazeAI , @wil_dev
If you find then give the solution.
Hi @RecomazeAI,
Seems that we have a similar problem. I have posted a workaround while we're waiting for them to fix this. I have reached out to the Shopify Partner regarding this issue and I do recommend you to send out a ticket as well.
Please refer to this link for the workaround:
Hope that helps!