menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Academic

Chat about Wowchemy, the page builder for Hugo, and its templates including Academic 👩‍💻📝🚀

Channels
Team

Unable to get Netlify CMS to work

April 4, 2020 at 12:39am
The Academic community has a new home. This thread is preserved for historical purposes. The content of this conversation may be innaccurrate or out of date. Go to new community home →

Unable to get Netlify CMS to work

April 4, 2020 at 12:39am
Hi All, I've just updated to v4.8 via the "Add all Breaking Changes" route since I was silly not to fork the repo back when I first built my site.
Anyway, I've gotten to the point of adding an identity and re-deploying my site, however, when I confirm my email I'm not prompted to create a password for Netlify CMS. I am given the option to create an account, which then requires another email verification, but each time I'm brought back to my site but no confirmation. Typically there is some form of extra text in the address bar <mysite>.com/#confirmation_token=HoyVCrTKlGgTto7NHFEKpA.
I've searched around a bit on the CMS GitHub, and most people who have this problem have it because they haven't added the identity token into the <head> of their index.html. I made the changes suggested in the v4.8 changelog but to no avail. Any help would be greatly appreciated! Thanks.

April 5, 2020 at 9:06pm
We've clarified the instructions in the Academic docs which might help in your case:
  • Login to Netlify and click the site you deployed with Netlify
  • Go to Settings > Identity, and select Enable Identity service
  • Under Registration preferences, select Invite Only
  • Scroll down to Services > Git Gateway, and click Enable Git Gateway
  • Head over to YOUR_SITE.com/admin/ to view your content management panel and begin publishing content
For support with Netlify CMS, refer to the Netlify CMS docs and the very active Netlify CMS community
Edited
like-fill
1

April 6, 2020 at 10:00am
Hey thank you very much for your response. I've made the suggested changes and still seem to have the same issue. Unfortunately, I am always prompted right back to my homepage with additional text in the address bar redirect or confirmation. I must be doing something wrong. I will keep fiddling around with things and ask the folks over at the Netlify CMS community and see what I can work out. Thanks again for the response!

April 7, 2020 at 1:27pm
I am having the same problem. I made the website(v4.8) by cloning locally. then made changes, then Added the Site to netlify( so, did not Install directly to netlify, does that change something in the CMS setup process?), then added Custom Domain. site deployed.
for CMS, followed the above Identity instructions. Then went to site.com/admin, it didn't work.
Then, acc to steps here , in the Identity Section, I clicked on Invite User, added my email, and set role as 'editor'. Step 2 "Copy the admin folder over to your static/ folder and push your changes to your remote Git repository, such as Github" wasn't needed in my case as the static folder was already there locally.
I got the confirmation email, but on clicking it just opens site.com/#invite_token=wFKRfIUgpsHvgibberish . I tried entering my Netlify credentials on site.com/admin . Didn't work.
Edited
I found these 2 links, I think the solutions here might work, but have 1 doubt for each which is preventing me from trying out the solutions:
  1. https://www.netlifycms.org/docs/add-to-your-site/#add-the-netlify-identity-widget where is the academic theme site's main index page? (not the admin/index.html), because that netlify identity widget script has to be pasted in the head of that main page, and a script has to be pasted too.
  2. https://community.netlify.com/t/common-issue-netlify-cms-git-gateway-email-not-confirmed/10690 how to tell the SSG not to add a layout to these templates(basically, custom html files made in the above link for confirmation email etc.) (there shouldn’t be any <html>, <head> or <body> tags for these pages)
Edited

April 8, 2020 at 4:36am
Update: It worked! Done! so, I used the option 1 above. Now, the problem I had was where to find site's main dex page. within the theme folder(themes/academic/layouts/partials/site_head.html) I found a custom_head.html file , with this text:
{{/* Do not directly modify this file! */}}
{{/* Instead, create a `layouts/partials/custom_head.html` file in your site and add your code to it. */}}
{{/* This partial is included in `themes/academic/layouts/partials/site_head.html`. */}}
So, in the root folder, I made a layouts/partials folder with custom_head.html and pasted this :
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
<script>
if (window.netlifyIdentity) {
window.netlifyIdentity.on("init", user => {
if (!user) {
window.netlifyIdentity.on("login", () => {
document.location.href = "/admin/";
});
}
});
}
</script>
Edited
like-fill
2
one thing I still don't understand is why this is showing 0 invited users, even though I invited myself with Netlify Identity, logged in to CMS. but this isn't a academic theme doubt, problem with Netlify.

April 8, 2020 at 7:00pm
Thanks for confirming the solution that worked for you!
This is a popular kind of site setup so we'll plan to add these two Netlify Identity code snippets into Academic to make it much easier to login to Netlify CMS :)
like-fill
1
Yes, possibly Netlify choose not to count the site admin as one of the invite-only users.
like-fill
1
We've just updated Academic to integrate Netlify Identity. If you update to the latest master version of Academic, you should no longer need to add those 2 Netlify Identity snippets yourself - it should just work :)
like-fill
2

April 9, 2020 at 8:41am
cool, thanks. will update when v4.9 comes out👍
Thanks for your response and solution , and thanks for updating Academic to implement this for v4.9 . If I'm feeling adventurous I may install the WIP of v4.9 to test it out, otherwise I may wait until the official release as well.
like-fill
1

April 12, 2020 at 6:19am
you're welcome👍

April 13, 2020 at 2:04pm
Hi George, I realize this is a tangential question related to updating my Academic version, but tell me if this makes sense (as I'm fairly new to Git): I originally installed Academic via .zip (and manage it by Rstudio/command line), but that means I can't update the traditional ways via git sync or the update.sh that is included with the Kickstart version.
Theoretically, could I now fork the master branch for the v4.9 (WIP) version and then copy over my current updated site (v4.8), and then add the necessary Breaking Changes?
My thought process is that if I do this then when it's time to update to any new version in the future it will be much easier to sync my local fork with the upstream version and then push to my site, rather than doing the manual changes via the .zip version. That's how I understand it at least. Thanks again for the speedy updates and help!
Edited

May 12, 2020 at 7:27pm
Hi, this is couple of days later but after hours I'm still stuck on the error message you got. But I'm bit confused on how you fixed it. Did you 1. add the custom_head.html to the root of the repo where netifly is using? (root as in in the folder you mentioned?
Nevermind, got it fixed now. Thanks again!
Edited
like-fill
1