Image Widget showing only three images, but repeatedly

Since a few days ago, my client has noticed an issue with the Image Widget not properly selecting an image for a post. In looking I see the issue is much more grave. Instead of showing all the available images in the Image Library, it is showing only three images, but repeated several times. When selecting one of those three, all of its repeated items end up selected, as well.

So we are having an issue selecting an image, and the image seems not to upload correctly when a new one is chosen to be uploaded.

Here’s what the image widget selector is bringing up:

I pegged the version being loaded to 2.10.47, the last version we knew that worked, but it is still doing this same thing. Prior to pegging the version to 2.10.47 it was loading the latest 2.10.x version, currently 2.10.49.

Has anyone seen this, or know what’s going on?

We do have the editorial workflow turned on, and the repository is hosted on github

@delwin Welcome to the Netlify community.

Why do you think this is a Netlify problem and not a code or SSG problem?

I’m not actually sure what you mean by code or SSG problem (I don’t know what the abbreviation SSG stands for or refers to). It is the Netlify CMS widget that produces the displayed image selector, so without changes on our part, I’m assuming it’s the CMS code, which wasn’t pegged to any specific version.

More information: I can’t try all versions, but have pegged the CMS version to 2.9.7 and things work properly, again, with the image widget. It seems the client did not use the Image Widget functionality in their edits before the lockdowns, so my previous statement about 2.10.47 having worked is incorrect. All I know, now, is that it works in version 2.9.7, but not 2.10.47 and 2.10.49

“SSG” means “static site generator,” which in your case seems to be the Netlify CMS. You were a little terse in your original question, so I didn’t get the specifics of your reference to the version numbers.

Ah, sorry about that. I think I ill-advisedly relied on the tagging of the post with Netlify-CMS, but I know I often miss those things myself, and should have been more clear in the actual post text.

So still wondering why this might be an issue in more recent versions of Netlify CMS and/or if anyone else has encountered this issue.

I’ll start trying to pay attention to those tags myself!

Hi @delwin, do you mind sharing your config.yml and possible a link to the repo if public?
If the repo isn’t public it would be very helpful to share a public repo reproducing the issue, or at least the directory structure of the repo, specifically the files in media_folder as configured by config.yml

I will ask my client about this possibility, as it may reveal too much publicly for their comfort.

It seems this is maybe related to our attempt to use the graphql flag, which was done because the client was constantly running into API limits (504 errors) on github. The interface makes several uses of relation fields which had been causing thousands of API calls. It seemed to be reduced to hundreds using graphql, but that flag is only supported at 2.10.0+, so rolling back to 2.9.7 actually made that flag do nothing. (use_graphql: true)

I suspect now that the client is doing a lot more work, again, that we’ll see issues with too many API calls, so may need to remove relation fields and have them manually search for and enter related article field values (prone to error, but may be all we can do for now). At least until the graphql implementation works with the media selection, as well

And, in fact, no. I set up an environment where I could test the 2.10+ versions without the use_graphql flag set, and it unfortunately makes no difference. The media selector works in 2.9.7 but not in the (latest?) 2.10.4x versions, regardless of using the graphql API

@erez I have permission of my client to provide you the config.yml and media_folder, but this would need to be done privately, not on the public forum. Is there a way I can get this to you privately, and ensure the information not be public?

Hi @delwin you can use our slack and send me private message, though it is best if you can produce a smaller set of config.yml and media_folder that reproduces the issue.

@erez Sorry for the delays. I have set up a cloned repository within github and linked the cloned admin to it in an effort to bring you the requested, pared-down resources. In doing so the problem disappeared with the new, cloned repository. Linking the admin back to the old repository (in config.yml), the problem re-appears. So the issue seems to somehow be related to some state of the git repository on github.

So I am communicating with my client to determine if using a newly cloned repository might be an acceptable solution for them, and if it does work, whether we could give you private access to the existing (“old”, uncloned) repository to examine to see why this might happen.

I probably will not have anything for you before the end of the weekend.


1 Like

Thanks for your efforts and the follow up @delwin

Last weekend I was preparing the new repository for my client to use so I could get you the original repository where we were seeing this issue. I’m not sure what I was seeing a couple weeks ago when I said that the issue went away with a new repository, because it does not, in fact disappear. I suspect I may have accidentally left the Netlify CMS version pinned at 2.9.7, where we already know things work.

So I have set up a clone of the repository on my own github account, ready to provide you access to for your debugging purposes. For my client it means we need to remain pinned to 2.9.7 for the moment.

I will attempt to contact you, @erez on your slack board for arranging this access.


1 Like

Sharing the fix for context