Blueprint field content saving to txt file but not fetched in panel

Hi there, I’ve used this great CMS for a while now but have come up against a confusing issue.

I recently created an e-commerce site integrating Snipcart, which creates product pages from CSV and has custom fields in the individual product blueprint to handle bespoke options. I followed the cookbook recipe for all this and it works absolutely great.

I am now trying to replicate this functionality in another site but have run into a problem - the content fields save to the txt file but are not fetched in the panel. The panel appears to save correctly - green smiley on save and text content displays in field, but on page reload the field is blank.

This only happens on the automatically created sub-pages. Other pages work as they should.

I’ve searched previous forum threads and checked yml typos / indents (can’t see any issues) and server-side caching (again, can’t see any issues. I uploaded the previous site to the same test server and it works fine).

I can’t see I’ve done anything different to what I did before but I’m pretty sure it must be an error I’ve made somewhere. The only difference is that I’m using the latest Kirby starter kit for this one.

My blueprint:

title: Clothing Item Page
preset: page
fields:
  text1:
    label: Options
    type: textarea
    size: small

My model to include the custom field:

<?php

class ClothingItemsPage extends Page
{

    public function children()
    {
        $csv      = csv($this->root() . '/clothing.csv', ';');
        $children = array_map(function ($card) {
            return [
                'slug'     => Str::slug($card['Product Title']),
                'template' => 'clothing-item',
                'model'    => 'clothing-item',
                'num'      => 0,
                'content'  => [
                    'imagelink'   => $card['Image'],
                    'title'       => $card['Product Title'],
                    'price'       => $card['Price'],
                    'sku'         => $card['SKU'],
                    'description' => $card['Description'],
                    // add additional fields
                    'text1'     => $page ? $page->text1()->value() : null,
                ]
            ];
        }, $csv);

        return Pages::factory($children, $this);
    }

}

Any ideas?

Hm, but if you want to merge virtual content with content from the file system, you have to follow this guide:

Thanks texnixe, that’s exactly what I did for the previous site that works - just looked at the new site again and I totally missed fetching the subpages in the model :man_facepalming:

Sorry for the dumb question, think I’d been looking at it too long to see what was right in front of me!

Don’t worry!