I’m just starting out with kirby. I have installed the editor plugin and am trying to save some blocks. I use Kirby 3.3.4 and editor 1.0.2.
This is my blueprint:
title: Textblock mit Überschrift
icon: text
fields:
headline:
type: text
text:
label: Editor
type: editor
files:
query: page.parent
uploads:
parent: page.parent
template: image
No matter what I do, how many blocks I save, this is the stored text file:
Title: intro
----
Headline: Hier eine Überschrift Block
----
Text: null
There are no errors in the JS console and I can see the content transmitted via XHR.
I’m developing on a docker setup and have moved index.php, media and assets to public folder which is the webserver’s root. In the index.php I mapped the roots like this:
As I understood from the documentation this configures the editor where to look for files and place uploads, in this case use the folder of the parent page. That works, the uploads are placed in the parent folder. So it seems the indentation isn’t the problem here.
Must be something else. The content is not getting saved. I can see it in the request payload, but the JSON response of the application doesn’t contain it:
Yes, the simple text field gets saved. I took parts from the demokit to test it as well. Editor is used for blog articles there. After saving the content of an existing article, all editor content is null.
I fiddled around a bit more with Kirby and am quite impressed in many areas. I created a template using Builder that works for now. But I’m quite keen on testing the editor.
Maybe there’s some server setting that’s causing problems? I am using a Docker based enviroment: https://github.com/S1SYPHOS/Docker-Kirby-Starter-Kit
Looks okay in my opinion. My public folder does contain assets, the media folder and index.php.
Okay, then it’s probably an issue with the docker environment, I will switch to another set up. If I might be allowed the suggestion, it would be really cool if you’d provide an official docker container to get a quick start for new users. It’s not like I am unable to install a LAMP/LEMP/WAMP whatever, but docker has become my preferred local development environment over the years. And I guess there are many others users using docker too.
Ok, just an update. It’s not about the environment. I just cloned the demokit, spun up a simple Docker image generated by https://phpdocker.io/ and everything works as intended. In my test project I debugged the process up to the point that I can see the data is lost when validating the Page on saving (the class is ModelWithContent method update). Will investigate further.