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 All,
How can I troubleshoot the 'Not Found' error when attempting to update a theme asset using the Shopify API with the scope 'write_themes'?
I have verified the correct theme ID and asset key, and ensured that the asset exists in the specified theme. Are there any additional considerations or permissions required to modify theme assets?
I am using shopify-app-template-php - I followed the documentation, please find my code below:
$asset = new Asset($session); //verified, OK
$asset->theme_id = $themeId; //verified, OK
$asset->key = "templates/product.liquid"; //verified, exists, OK
$asset->value = $updatedContent; //my updated content to product.liquid file. Basically I would like to add someghing like: {% include "my_custom_liquid" %} to product.liquid
$asset->save(true);
Response from Shopify\Exception\RestResourceRequestException:
REST request failed: "Not Found"
Many thanks!
@andrew4real Did you got any workaround or solution for this problem. I am also getting this error and unable to figure out the real problem. The app have these permissions: "write_products,read_script_tags,write_script_tags,read_themes,write_themes"