Writer field gets emptied after slug change

Hello everyone,

I am having a small problem with a template… small in my case, but potentially big problem overall, since it occurs on multiple servers, browsers and kirby versions.

When I have a writer field directly in the blueprint, not in a layout or blocks, and I change the slug of the page, most of the time the writer field becomes empty and the page shows the revert and save buttons, as if there was a change. If I refresh many times at some point the text appears again and the buttons disappear. or if I press revert, then of course the text reappears.

This is happening on:

  • a virtual production server running kirby 3.8.3 and php 8.1 (provider: hetzner)
  • an alternate virtual server for testing, same versions (provider: hetzner)
  • using safari and firefox on mac, and safari ios
  • I then just loged in into an old test installation of the starterkit I have on my regular apache shared hosting server (provider: netcup). This install is running kirby 3.6.2 and php 7.4… and wellp… it happens there as well :confused: so I guess it is not related to the virtual servers or my code, because this is an older starterkit.

For a regular user it would be very confusing if after changing the slug suddenly the whole text is gone and the save and revert buttons appear. Has someone else experienced this? the strange thing is on my localhost (I use MAMP) it is not happening.


Can you reproduce this in a fresh and up-to-date Starterkit (3.9.2)?

sure, done. it happened on the second try. first rename went ok. second had the same behaviour.

kirby 3.9.2, php 8.1.5 regular shared hosting of netcup

again, it doesn’t happen all the time, but I would say 60% of the time (on the servers, localhost is fine, as I mentioned before)

I think weird issues like this happened in the past due to caching on serverside. Can you check whether caching is enabled on server-side, e. g. opcode cache or similar, and disable it, clean up the cache and try again?

Could also be some web application firewall misconfiguration/issue.

sorry, i hadn’t had time for this. but yes! :slight_smile: now it works, thank you so much for this hint!

but btw… I just find it strange that the layouts dont have this problem, nor writers inside layouts, etc. it is only when a writer field is directly inside a fields section.