I am playing around with pageModels to access an SQLite Table and be able to manage and edit content. While i have done that in the past for newsletter subscriptions it seems like on other occasions i seem to be stuck.
It seems like even though i am following the guide from here:
https://getkirby.com/docs/guide/virtual-pages/content-from-database
The writeContent function seems not to fire correctly? …
- Creating a new subpage will result in “subpage cannot be found”
- Updating data on an existing one seems to instantly revert back to what has been already written into the database while typing
- Deleting & overwriting title function works
The only difference to my previous attempts are, that within the saved that there’s a structure already available in yaml (which will be outputted by the panel correctly)
The models are more or less a copy&paste from the guide.
Maybe a problem with content type?
like what?
- field/blueprint declaration?
- saving yaml within array fails?
- database fields are not compatible with data?
that are the only things i can think of that are different to the reference
This, yes.
I had this problem with an Airtable example I tried and couldn’t get the toggle field to work.
most fields are “text” or “integer”, and they pretty much have straight forward informations
the only field which is out of being default is
- products (text) (data saved there in yaml format) e.g.
-
product:
> some-product
qty: 1
price: 20
which at least gets read successfully in the panel.
maybe i should disable all fields and try to see if updating works…
I’d check if the yaml field is the culprit or if not, if it’s any other field.
i have disabled all fields except some simple text fields and it still reverts whatever i do…
when checking the inspectior, there’s the following errors which repeat over and over again:
{status: "error", route: "(.*)/lock", exception: "Kirby\Exception\Exception", message: "An error occurred", key: "error.lock.notImplemented", …}
I’ve seen there’s a content lock feature in the last few releases, i haven’t worked with them at all, could that be the culprit?
Yes, are you using the latest (today’s) release?
i just updated a moment ago.
also found this:
Yes, but that is supposed to be fixed now.
If not, then we might have to reopen.
i’ll check and report back.
Edit: Seems like the update fixed it… working with yaml structure