Hello,
I’m experiencing an issue where my home page shows a 404 error instead of loading correctly, both in the customize view and the live view.
Here’s what I’ve done:
- I have a production environment and created a new theme, made edits to it, and exported the theme as a zip file.
- I then set up a development environment, imported the zip file, and now the home page redirects to a 404 error. For clarification, I imported the original theme from the production shop and it worked fine after manually copying the navigation.
Can anyone suggest how to resolve this?
I found the following log in the console:
main.js:907 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
at StoreHeader.bindEvents (main.js:907:23)
at new StoreHeader (main.js:892:10)
at main.js:1086:16
And in the network log, loading my page returns a 404 code.
Here is the link to my page: https://tshirt-van.myshopify.com/
I would really appreciate any help. Thanks!
@huongpho Can you pleas share theme files to review issue.
thank @ProtoMan44 for replying, but I could not upload .zip and .7z as well.
I uploaded to my drive and share with you https://drive.google.com/file/d/1JMhhhVHP30blJwBvnA3SGcB0sI5Nb5vE/view?usp=sharing
Thanks
let me check the theme @huongpho
hey, @huongpho I have checked your theme.
Your theme has missed the index.json file in your theme therefor it makes 404 page on the home.
@huongpho
please check your theme on my demo store
link: https://a-stack-demo.myshopify.com/
preview pass: shopifydev44
@huongpho if you feel it fixed so please mark my reply as solved, thanks.
1 Like
I managed to resolve the issue and wanted to share my experience for anyone facing the same problem:
- My original theme included an index.json file, and the exported files also contained an index.json file.
- However, during import, the index.json file wasn’t imported due to an error (a missing source for a video clip).
To fix this, I manually added the missing video clip, created a new index.json file, copied the content over, and now everything is working.
Thanks for your help!
3 Likes