Can't save Alternative text using the media screen

Describe the issue:

  • Please include any relevant error messages, screenshots, and troubleshooting you’ve already tried.
    When saving Alternative text to random images in media we are getting this message.
    Screenshot 2024-01-29 at 1.33.04 PM

sample url

(Optional) Can you provide a link to the item, model, or project in question?

(Optional) Do you have any sample code you can provide?

Hmm, what is the alt text you are trying to enter? Is there any error in the JS console or network tab?

Does this happen completely randomly, or only with certain strings / images / types of images?

I’ve tried various strings and images (including that one) and am having trouble reproducing it :frowning:

https://www.datocms-assets.com/101203/1705846925-using-a-tablet.webp. try this one

This is what I typed @roger

Errors

@dthreatt This might be a bug… and I’m really sorry for troubling you, but could you please help us a bit by expanding that error message fully? (or in the network tab, see what the JSON request says?)

When it succeeds, it should look like this:

Do you see an en object and the alt field within it?

It’s odd that the error says INVALID_LOCALES. As far as I can tell, your project only has the English locale enabled.

Are you able to see what it’s actually trying to send when that error happens?

Its a huge var i cant expand it all and look

I went to do it and get the json and it worked all of a sudden. ill try and find another

It might be easier to see in the network tab, under the “Payload” tab. Sorry to make you jump through hoops like this! I tried it multiple times on multiple images and haven’t been able to reproduce it yet :frowning:

Happened again today. Sorry for the late reply but I had to wait until I found another one

So it doesnt it a few times then when I refresh it stops doing it. Ill have to find another one. I am still unable to find the screen you are showing for the network payload.

Figured it out. Here is one.

@dthreatt

Thank you VERY much for the details. I’ve been able to reproduce it on that image reliably now, and will report it to the devs as a bug. I’ll let you know as soon as we have a finding!

It seems like a workaround for now is to just close that image in the editor and then re-open it again. The error only seems to happen for me the first time that image is opened (via a URL). I’ve tried making it happen with that same image in another project, but it doesn’t seem to. It’s a weird bug. We’ll look into it as soon as we can, sorry about that!

I was able to get around it by just refreshing the page.

1 Like

I’ll make a note of that too.

Quick update: The devs have confirmed the bug and are looking into a solution! We’ll keep you posted :slight_smile:

Thanks

@dthreatt, we believe we’ve deployed a fix for this bug. Could you please try again when you get a chance and let us know if you still run into it?

ok will try