Well, I’ve been at this all day, and I’m stuck…
I had a site working nicely with file sections in the Panel uploading files and applying file templates.
Then I split the site with a basic multisite setup. (Client needs a separate domain for regulatory reasons – it’s essentially all the same site.) I also updated from Kirby 3 to 4.1.0.
The panel doing the file uploads goes with site-two.
Somehow file templates are now not being applied. The files do get uploaded, but the .txt file generated just gets a sort order and a Uuid – nothing else.
I’ve tried duplicating the files blueprint directories both under site-one and under the site root (in parentheses below) just in case it was a domain/routing thing, but that’s had no effect.
structure:
Multisite.com
-- assets
-- kirby
-- (site)
-- -- (blueprints)
-- -- -- (files)
-- SITE-ONE.COM
-- -- assets
-- -- content
-- -- media
-- -- site
-- -- -- accounts
-- -- -- blueprints
-- -- -- -- fields
-- -- -- -- (files)
-- -- -- -- pages
-- SITE-TWO.COM
-- -- assets
-- -- content
-- -- media
-- -- site
-- -- -- accounts
-- -- -- blueprints
-- -- -- -- fields
-- -- -- -- files
-- -- -- -- pages
index.php:
<?php
require 'kirby/bootstrap.php';
$sites = [
'site-one.com' => 'site-one.com',
'site-two.com' => 'site-two.com',
];
$host = Url::host();
$root = $sites[$host];
$url = 'http://' . $host;
$kirby = new Kirby([
'roots' => [
'index' => __DIR__,
'site' => $root . '/site',
'content' => $root . '/content',
'media' => $root . '/media',
'assets' => $root . '/assets'
],
'urls' => [
'media' => $url . '/' . $root . '/media',
'assets' => $url . '/' . $root . '/assets',
],
]);
echo $kirby->render();
excerpt of panel blueprint:
sections:
# Files section: https://getkirby.com/docs/reference/panel/sections/files
general:
label: General Information
help: after uploading, select the file to add a title
type: files
template: general
info: "{{ file.title }} - {{ file.category }}"
registration:
label: Registration Statement
help: after uploading, select the file to add a title
type: files
template: registration
info: "{{ file.title }} - {{ file.category }}"
I’ve reset permissions on the Ubuntu test server with:
# change owner for all Kirby files and folders:
sudo chown -R www-data:www-data *
# change rights on all Kirby files and folders
sudo find /var/www/ -type d -exec chmod 755 {} +
sudo find /var/www/ -type f -exec chmod 644 {} +
… but uploads behave the same on the test server as on my Windows local dev.
Again, it was working fine before the split.
I’m not sure what else to share that might hint at the problem. Halp…?