Anyone come across this issue when trying to updat...
# replo-help
l
Anyone come across this issue when trying to update a theme? ChatGPT thinks it's because of these 2 files (both containing Replo content), and that there can only be one index file. Can they be merged into one?
t
This post is now synced! Check it out here: Issue Updating Theme: Merging Replo Content in Index Files ⤵️ Any future comments will be automatically posted to the thread
l
ChatGPT suggestion: How to fix 1. Decide which format you want to keep ◦ If you’re upgrading to a Shopify OS-2.0 theme (and want to use sections/blocks), you should keep the JSON template and delete your legacy
.liquid
one. ◦ If you really want to stick with a single monolithic Liquid template, you could delete the JSON version — but you’ll lose all the new section/block flexibility. 2. Delete the conflicting file ◦ In your Shopify admin go to Online Store → Themes → Actions → Edit code ◦ Under Templates find index.liquid (or index.json, depending on which you’re removing) ◦ Click the trash can to delete it 3. Run the theme update again ◦ Go back to Online Store → Themes and click Update ◦ Now that there’s only one
index
template, the copy will succeed 4. Manually merge any customizations ◦ If you deleted
index.liquid
, you’ll now need to move any bespoke markup or settings into your
index.json
sections ◦ Or, if you deleted
index.json
, you’ll lose built-in sections support — so you’ll want to re-implement any blocks as Liquid snippets But the index.liquid says autogenerated by Replo, do not modify?
Presuming index.replo.original.json is a backup of the original homepage (not the current replo homepage), so can that be deleted?
n
That’s weird, I’ve never seen this error when trying to publish a theme. It comes up when you try to create an index.liquid, but an index.json already exists - potentially the theme you’re trying to add already has an index.json? In any event you’re right that the replo original.json is a backup which will be re-applied when you un-toggle the “set as homepage” toggle in Replo so you should be able to delete it if you don’t care about restoring the old homepage ever. However, based on the error message I think that might not be the issue
l
Yep deleting that original index.replo.original.json file didn't fix it unfortunately. What we're doing is trying to update the theme Savor from 1.0.0 to 1.0.5 So guessing it's a conflict between trying to copy over the replo homepage and the updated version also trying to add an index file, so it fails because there are 2
n
Seems like you have an index.liquid, which I assume is because it was generated by replo, and you’re trying to update with a new version which has an index.json (non-replo, which is fine). I think the way to do this is to rename index.liquid to index.json and replace the content with valid json, then do the upload again Honestly Shopify is very strict about these validations though, so I can’t remember what states the index file is allowed to get into
l
Ok got it, so how do I update the current index.liquid content generated by replo to valid JSON?
n
Yeah that I’m not sure about, can’t remember exactly what the theme editor will or won’t let you do - I think you can just rename the file using the pencil icon in the theme editor? Also something that might work is to actually add the replo backup json file back, then unset the homepage in Replo. Shopify is super weird about editing the theme in these cases
l
Thanks @Noah Gilmore this worked perfectly, I changed the name of the index.liquid file then updated the theme which removed the Replo homepage, and then republished the homepage within Replo. May just be an issue on these new Horizon themes as I have never come across it before
n
Amazing, glad to hear it worked!
🙌 1