Open fvsch opened 1 year ago
It's quite possible that this is related to the built in PHP server or your opcache settings. Normally this is not necessary at all.
@fvsch I can reproduce but I don't think this is a bug. I assume you updated the blueprint file without saving the page after making changes to the page, is that correct?
@afbora Good catch: this only happens if the image is uploaded but the page is not saved.
This still feels like a bug though? Why would it behave differently when the page is not saved yet?
When I reload the page (still unsaved), the DevTools Network panel shows that the panel is requesting the resolved blueprint data for the page:
But there is a saved change in localStorage that contains the old config for the image, and that gets applied on top I suppose:
Feels a bit strange that data like the image ratio or background color would be part of the change data. But stuff like the info text is tricky because you need backend access to the file to update it.
Still a bug IMHO, but maybe it's too much of a stretch to solve it with the current design.
Maybe the only possible fix is adding a warning to the docs, e.g. on https://getkirby.com/docs/guide/blueprints/introduction, that when working on blueprints you should make sure that all page content is saved or there might be conflicts between unsaved content and the updated blueprint?
I don't think it is a right logic and possible case to change the page structure without saving the page.
This will need a while - we need to move in quite a few places from storing those meta info alongside the content values, but separately.
Description
It looks like the
files
field type caches the config used to render image cards in a way that makes it near impossible to modify a page or section blueprint and see the results of changes in the panel.When trying to modify field options like
info
,image.ratio
orimage.back
, changes are not picked up, even when restarting the development server.Changes are picked up when:
my_image
tomy_image2
).Changes to other field options such as
label
orlayout
are picked up with a page refresh.Expected behavior
It should be possible to work on blueprints and see the results in the panel, especially during development. Ideally that should happen automatically, without specific config tricks.
To reproduce
Create a new plainkit project with
composer create-project getkirby/plainkit
Start a development server with
composer start
Create a
site/blueprints/pages/test.yml
blueprint with:In the panel, create a page of type “Test page”, and upload an image for the “My Image” field.
Change the blueprint to:
Your setup
Kirby Version
3.9.2
Console output
None
Your system (please complete the following information)