Can't replace image in file section in panel

Hi there!

Unfortunately I can’t figure this problem out by myself:

Whenever I click on the three dots in an image card inside a file section and click “replace” (de: “ersetzen”) nothing happens except a little icon glitch where the search icon is. Also no error message.

I can however replace the image when I click “open” and then go through the image settings.

Is this a bug? I tried logging out and in again. I did not tamper with the folder permissions.

Some screenshots of the blueprint and the dropdown menu:

Thanks once again! :grimacing:

Which Kirby release are you using?

3.2.0, for some project reason – takes too long to explain – I can’t really update it. : /
(If that’s the issue.)

The project was set up some time ago, and it has a custom panel css etc. So I don’t dare to update it.

There was a broken replace issue: https://github.com/getkirby/kirby/pull/2153

So you would have to update to fix that. It’s generally not a good idea to make a project non-updatable. We constantly fix issues… And sometimes issues are also security related.

1 Like

That’s true. Do you think an update would somehow break a custom css? Or do you maybe know if there’s anything major that can break after an update from 3.2 to the currently latest version?

I mean of course I will back up it beforehand.

I don’t really think that much has changed. But I would test it locally first anyway.

There were some breaking changes from 3.2 to 3.3 which you can find in the changelog for 3.3: Releases · getkirby/kirby · GitHub

1 Like

Ah ok thanks! I will update it then.

Thanks it worked after updating Kirby! :smiley:

Quick follow up question concerning replacing images:
Can I have a file field inside a structure field where I can actually replace a file? Or is the replace function only possible within sections?

The structure field looks like this:

You can select a different file, but you cannot actually replace the old file with a new file.

Hm ok.

I have an additional file section with all the images, where you can actually replace an image, however to have the thumbnail of the previous image updated, I need to reload the whole panel page. :confused:

Do you know if there could be a “force-refresh” of the thumbnails of the newly replaced images?

No, I don’t think there is a way to do that.

I guess the not refreshing is a Vue-problem (?)
Thanks anyways!

I guess for that to happen, either the Panel would have to refresh automatically after a replacement or it would have to emit an event that all fields would have to react on.

Ah, but I thought that it refreshes anyways every time after something gets dragged or added or so.

Hm, but if that was the case the thumb should also refresh unless it is cached in the browser. Haven’t tested that yet.

Very dump question, but this is a structure entry in a modal? How did this work?

1 Like

It’s this plugin https://getkirby.com/plugins/steirico/custom-add-fields

Ahh ok, but this seems to work only for pages right? Cause you’re talking above in the post about a structure entry

Ah, no, it’s a structure field inside a modal window which then populates a regular structure field entry (see screenshot).