Manual initialisation with IdentityWidget enabled

Hi there, I’m building a Gatsby theme that uses Netlify CMS with manual initialisation. I’ve created a Gatsby site that consumes this theme and deployed with Netlify.

I then started using the Netlify Identity and everything works out.

I’m getting this odd behavious in which when first landing on the admin page the login iframe is rendered but the visibility is the to false so I end up with the modal overlay alone. This can be thankfully dismissed and I can then click on the [Login with Netlify Identity] button and trigger the modal again which get displayed as expected.
I’ll be investinging further in the next coming days, I just thought to ask if anyone has had any similar behaviour or can suggest what I should look out for.

Site admin can be seen here https://gifted-sammet-3ed157.netlify.com/site-launch/#/

hmm, before we start digging, can you confirm that you are seeing these issues in a browser that doesn’t have any extensions that might interfere? an incognito window is an easy way to check.

Hi @LuigiClaudio. Are you by any chance using gatsby-plugin-netlify-cms? It has the Netlify Identity widget already included, so if you manually add the script to your admin index, you might run into some trouble. Not sure if it’s the case, but if you have included the identity widget manually, I’d advise you to remove it.

hi, thanks for the reply. Yes I’m using the gatsby-plugin-netlify-cms, I forgot to mention. I’m not including the script to my admin index file, I’m using the enableIdentityWidget flag in the plugin options in gatsby-config and enabling Identity in Netlify admin. I would share my repo but it has some deps to private packages, I could create a similar project and remove those deps if needed…

hi, thanks for the message and suggestion. I’ve tried and get the same results, I’ve shared the link to the admin page in my initial message.

Hey @LuigiClaudio, can you take a look at this issue and let us know if this looks like what you’re running into?

If so, it looks like it’s on the CMS team’s radar and you could add your emoji response there, but maybe @erez will have some additional guidance :slight_smile:

Thanks for the mention @jen, this looks like a very similar issue. I’ll try to create a reproduction.
@LuigiClaudio any chance you can share your repo/an example repo with this issue?

Hi @erez, I’ve put this together for the sake or reproducing the issue described https://github.com/LuigiClaudio/netlify-cms-2260-overlay-intial-load or git clone https://github.com/LuigiClaudio/netlify-cms-2260-overlay-intial-load.git - I’ve deployed it here https://musing-curran-178e69.netlify.app/ - Hope that helps, let me know if I can do anything more.

1 Like

Update: I think I was able to track down the underlying issue and submitted a fix https://github.com/netlify/netlify-cms/pull/3660.
I’ll do some more testing to verify it.
Thanks again @LuigiClaudio for the patience and all the information you’ve provided.

1 Like

Another update: I forked the repo @LuigiClaudio supplied then created & deploy a branch with the CMS version with the fix:
Before https://amazing-swirles-f2a7bc.netlify.app/admin/#/
After https://fix-use-custom-netify-cms-app--amazing-swirles-f2a7bc.netlify.app/admin/#/
Custom branch https://github.com/erezrokah/netlify-cms-2260-overlay-intial-load/tree/fix/use_custom_netify_cms_app