Hello,
I have migrated a homepage from v2 -> v3.3.
Almost everything worked except that I have problems on already existing pages images with the files field are not saved.
I can select the image in the fiels field and save the changes, but if I make a reload, the selection is no longer saved. When I create a new page, that does not happen.
What did I try?
The file permissions are reset
Deleted the thumb folder
The Thumsdriver changed: ‘driver’ => ‘im’,
However, that does not help.
My Blueprint:
title: Default
icon: page
pages:
template: default
options:
preview: false
changeTemplate: false
columns:
# main
main:
width: 2/3
sections:
drafts:
headline: Draft
type: pages
status: draft
layout: list
template: page
empty: No events yet
sortBy: date desc
info: " {{ page.title }}"
text: " {{ page.title }}"
image: false
published:
headline: Published
type: pages
layout: list
status: published
template: page
empty: No events yet
sortBy: from desc
info: " {{ page.title }}"
text: " {{ page.title }}"
image:
query: page.cover.toFile
ratio: 1/1
cover: true
content:
type: fields
fields:
show_in_home:
label: Should this page appear on the homepage ?
type: toggle
home_categorie_image:
label: image
type: files
multiple: false
query: page.images
max: 1
# sidebar
sidebar:
width: 1/3
sections:
# a list of files
files:
type: files
headline: Files
My config:
<?php
return [
'debug' => true,
'panel.install'=> true,
'languages' => true,
'community.markdown-field.buttons' => ['headlines', 'bold', 'italic', 'divider', 'link', 'email', 'pagelink', 'file', 'divider', 'ul', 'ol'],
'community.markdown-field.font' => [
'family' => 'sans-serif',
'scaling' => false,
'size' => 'regular',
],
'community.markdown-field.modals' => true,
'community.markdown-field.blank' => false,
'community.markdown-field.invisibles' => false,
'thumbs' => [
'driver' => 'im',
'autoOrient' => true
],
'hooks' => [
'page.duplicate:after' => function ($duplicatePage) {
if($duplicatePage->template() == "news")
{
try {
$dateNow = date_create()->format('Y-m-d H:i');
$newcontent = $duplicatePage->update([
'article_title' => 'new title',
'created' => $dateNow
]);
} catch(Exception $e)
{
$e->getMessage();
}
}
}
]
];