Hi! I’ve never encountered this problem with my previous projects, and I can’t seem to find a solution.
I have some sites using Gatsby, Netlify-cms and Netlify. They all worked, but not on my latest project.
I have my config.yml correctly set up. I enabled Git-Gatewat en Identity. When I set registration to invite only, and I want to invite myself, I end up having an invite that just sends me to the main page.
I’ve used this method of registration before, and have never encountered this problem until now. I’m not getting any errors as well.
By default, the netlify identity widget sends you to the root of your website, while your identity widget might live only at /admin/. You could add the identity website to the <head> of your root page, but a cleaner solution might be to change the identity emails: Identity-generated emails | Netlify Docs
Hey Tom! Ow so that’s why. I have gatsby-intl installed, which means I have a site/en/ and a site/nl/ page, while the admin part lives at site/admin. Could that be the issue?
Thank you for your templates. I probably need this one. <a href="{{ .SiteURL }}/admin/#invite_token={{ .Token }}">
So my follow up question goes as follows: is this the default link, or is it your solution to the problem?
If not, what URL do you think I should use, based on the info given above?
If you’re only using Netlify Identity to sign up users for the CMS and the Identity Widget only lives at /admin/ I’d advice you to use the templates I posted (which are not the default, which look like this: {{ .SiteURL }}/#invite_token={{ .Token }}
If however, you’re using the Identity Widget for other visitor access related things, you might as well make it available on both your root routes (I’m guessing that’s not the case though )
Alright! Seems obvious. I’ve been mashing my head over it for some hours now, so I’ll try your solution. I’ll come back if I’ve resolved the issue. Cheers mate!
Follow up problem . When clicking the new invite link, I’m getting redirected to the admin page, but it isn’t clickable, nor is there a popup asking to fill in a new password.
I’m only getting this.
The strange thing is, the button isn’t clickable, like if there’s an invisible layer above it in the DOM. So i checked it and my assumptions where correct.
As you can see, there are 2 iframes. Setting the bottom display: none; to display-block; gives me the netlify popup screen as requested.
Don’t know if this is a bug, but it could be worth checking out!
I assume you’re using the gatsby-plugin-netlify-cms, which includes the identity widget by default. It seems like you also added the netlify identity widget manually. When the identity widget is loaded twice, it stops to work. Try removing the manually added script and try again!
While I’m going through your repo, it seems you’re loading the identity widget at the root of your site (I see it popping up at your homepage). Could it be that you’re loading it site wide, and then again on your admin page?
Well, not that I know of. I just leave all the default configuration on, (so just importing gatsby-netlify-cms). I never experienced this problem before, even with my other netlify-cms sites using git gateway and netlify identity. Unless I have to specify that in gatsby-config? But again, never had to do that in the past.
But indeed, it never occured to me that I’m loading netlify identity sitewide.
Uncaught ReferenceError: netlifyIdentity is not defined
at Object.<anonymous> (emitter.js:4)
at n (bootstrap:19)
at Object.<anonymous> (mitt.es.js:56)
at Object.<anonymous> (emitter.js:4)
at n (bootstrap:19)
at Object.<anonymous> (cms.js:1)
at n (bootstrap:19)
at bootstrap:83
at cms.js:1
So now the widget isn’t loaded at all.
Edit: The issue you linked is exactly my problem though. But his solution did not work I’m afraid.
Nope, that’s not getting us anywhere! Interesting that the identity widget disappeared from your homepage as well though. @erez or @erquhart might shed some light on this when they can.
Well, in the meantime, setting the second widget’s display: none to diplay: block fixed the issue for me. Which is not ideal of course, but it’s something. I’m going to look further into it tomorrow. Again, thank you for your quick answers and help!
Sorry for the late reply, I’ll look into the duplicate iframe, but I forked the repo, ran npm install, then npm run build, npm run serve, went to http://localhost:9000/admin and was able to click the button.