I’m running into a weird error when uploading a custom theme to Ghost. I’ve been uploading iterations of the same theme file for the last couple weeks without issue, but today I’m getting this error:
Searched the forum but didn’t see a similar issue. What’s strange is that I’m getting the error for any theme I try to upload. Even getting the error when I download the current theme and re-upload it. Not sure what’s going on here.
What version of Ghost are you using? Latest, hosted w/ Ghost Pro
Browser Latest version of Chrome OS Version 91.0.4472.114
Console Errors: DevTools failed to load source map: Could not load content for https://altpath.ghost.io/ghost/assets/vendor.min-c93f83ffbab76cb5d00b091e7aef9452.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load source map: Could not load content for https://altpath.ghost.io/ghost/assets/ghost.min-421ffe52eb692e5d473df86d435b0a91.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
I am getting something similar when I try to upload changes to my theme this morning: ‘Cannot destructure property ‘theme’ of ‘undefined’ as it is undefined.’
Sure. I’m hosted on Ghost Pro and not seeing the option to upgrade. Where can I find that in my account? @vikaspotluri123
Edit:
I opted to go with Ghost Pro as I’m not a super-technical user. Since I’m hosted w/ Ghost, I thought updates were automatic? ie. I’m not operating a self-hosted install, so I’m not really sure how to force the update. Any insights you can give would be greatly appreciated.
If you’re having any issue with a Ghost(Pro) site, please drop them an email on support@ghost.org and they’ll be more than happy to give you a hand directly
Updates are automatic, but I’m not sure what the delay is between a release on GitHub and availability for you
Same thing here. Mysteriously started yesterday as I was updating my new theme. Never seen this error before. I deleted the theme. Got a fresh copy from the developer, made the necessary changes, re-uploaded and it worked. However, today after making many changes, it has happened again. I am on Pro and running 4.9.3.
Can you run your theme through https://gscan.ghost.org (you can also use the gscan cli if you’re privacy conscious )? The name is not defined error is a bug in Ghost, but it only shows up if your theme might be invalid
Thank you @vikaspotluri123 I will go try that now. FYI I have just discovered that if I remove my custom home.hbs and compress to a zip file, the theme is accepted by the ghost admin. If I put the custom home.hbs file back, it throws the error.
A missing leading { in one of the handlebars. I zoomed up the Coda editor and saw it right away. I need new glasses. Thank you @vikaspotluri123 for letting me know about the gscan tool. Will use this always now. Hopefully @justinv will find a similar solution.