File blueprint field saving, but not fetched in panel or API

I have a basic caption field defined in my default file blueprint in site/blueprints/files/default.yml:

title: Default File

fields:
  caption:
    label: Caption
    type: textarea

The field appears in the file panel correctly:

This is even reflected in the corresponding text file alongside the image on the filesystem:

image

However, upon reloading the page, the caption is blank (even though the caption is still set in the file), and attempting to access it via the template via (string)$image->caption() returns an empty string.

I’m using Kirby 3.2.5

Does this happen with other fields as well, like page fields? Or is only file metadata affected? Can’t reproduce this.

It works perfectly in page fields. The site is multilingual, however. I’m not sure if this is relevant.

It’s such a strange behaviour, when saving, it just reverts to some incorrect previous string and on refresh, shows the wrong information even though the change is saved to the file:

I don’t see any errors/warnings in the js console either fwiw

Would you like to send me the project for debugging?

It might be a caching issue, actually. Does this happen locally or on the remote server? But then the question is why only file meta data is affected.

I could send it, you may be correct though as it doesn’t happen locally, only on the remote server.

However, I don’t have caching enabled on the server.

EDIT Okay @texnixe you are right as always! The culprit was the site is behind cloudflare and cloudflare’s caching was causing this problem! How confusing.

Not even some sort of server side caching? Or expire settings?

Glad that’s sorted out!

Thanks again for finding the right path to the solution! In case it helps anyone, I just set a ‘Page Rule’ in cloudflare to avoid caching on the panel route.

Everything is working as well as the API/template response now.