[Solved] Data missing on Save in a custom blueprint

I’m just starting out with Kirby 4.1.0 on a localhost environment.
The starting point has been a custom page blueprint called ‘Series’. It accepts a few text fields and an image file.

I’m noticing some weirdness when I open a Series page in Panel. (Panel correctly creates the page)

First, data entered into the text fields doesn’t get saved into content/test-page/series.txt. Selecting an uploaded image also doesn’t get saved into that file, either.

Second, when I upload an image via the Series page in Panel it does correctly get saved into content/test-series/ as well as its associated text file. However, the image’s URL keeps being wrong or not found, and it seems to be differently wrong in different places around the page…

I feel like I’ve missed something silly in the setup of my Blueprint or its registration, but I have no idea what. Any help is greatly appreciated! Thanks so much!

series.yml

title: series
preset: page

status:
  draft:
    label: Draft
    text: The series is still in draft mode. It can only be seen by editors with Panel access.
  unlisted:
    label: In Review
    text: The series is online and can be visited with the direct URL. The team must still give the final go to publish it.
  listed:
    label: Published
    text: The series (and all Volumes and Books within it) can be viewed on the live site.

fields: 
  series-description:
    label: Description of series
    type: writer
    toolbar:
      inline: false
    width: 4/4
    required: false
  series-image-hero:
    label: Hero image 
    type: files
    query: page.images
    cover: true
    limit: 1 
    multiple: false     

.

plugins/series/index.php

<?php 
Kirby::plugin('your/series', [
    'blueprints' => [
        'pages/series' => __DIR__ . '/blueprints/pages/series.yml'
    ]
]);
?>

Curiously, if I manually add text under the series-description in the text file, the text does not appear in the Writer field…

Also, I’ve checked the MacOS permissions on the local files – my user has read+write permissions; the ‘staff’ and ‘everyone’ names only have read access.

Your field names contain hyphens, which are not allowed

Ah. Right. Yep, I’ll count that as “I’ve missed something silly”. Thanks so much for your help - I really appreciate it!

The image URLs still seem to be incorrect, though… any thoughts what’s going on there?

In what way? Are you rendering them correctly in the template? Files | Kirby CMS

Mmm… potentially not. Learning how to render images properly might be today’s focus.

(Going to close out this thread, and start a new thread for the image stuff)