Hello,
We have a website running on Kirby 3.10 on PHP 8.2.
In the past someone has written an importer to easily create pages from an external source.
In this importer there’s an option to copy an image to a page and assign it a field.
In the past this used to work really well, but with the upgrade it stopped working.
The image will still be copied to page and assigned to the content fields, but for some reason the template of the image is not set correctly.
In the code we use the changeTemplate function, but this doesn’t work.
Is this a bug in the Kirby 3 CMS or am I using the method wrong?
// Find file in importer
$file = $this->files->find($saveName);
//Copy file to page
$file = $file->copy($currentPage);
//Assign template to the file
$file = $file->changeTemplate('image');
Kind regards in advance.