Hi guys
now I have more informations to this bug.
If I add an contentImage to my new custom page-type NewsArticlePage, I got this error from above.
And I have a second problem. This custom page-type also add this output between the head and body tag:
resource://XY.xy/Private/Templates/NodeTypes/NewsArticlePage.htmlTest 123test1
(Test 123 was my page title, but this resource doese not exist)
Here is my config:
Root.ts2
include: NodeTypes/*
include: Documents/*
page = XY:xy:Page
root.newsAritcle {
condition = ${q(documentNode).is('[instanceof XY:xy:NewsArticlePage]')}
renderPath = '/newsArticle'
}
newsArticle = XY:xy:NewsArticlePage
Documents/DefaultPage.ts2
prototype(XY:xy:Page) < prototype(TYPO3.Neos:Page) {
head {
metadata = TYPO3.TypoScript:Template {
templatePath = 'resource://XY:xy/Private/Templates/Page/Default.html'
sectionName = 'metadata'
}
}
body {
titleImage = TYPO3.Neos:ImageUri {
asset = ${q(node).property('contentImage') ? q(node).property('contentImage') : q(node).parent('[contentImage != ""]').property('contentImage')}
maximumWidth = 1200
}
templatePath = 'resource://XY:xy/Private/Templates/Page/Default.html'
sectionName = 'body'
parts {
title = ${documentNode.properties.title}
main_menu = XY:xy:MainMenu
header_menu = XY:xy:HeaderMenu
footer_menu = XY:xy:FooterMenu
footer = TYPO3.Neos:ContentCollection {
nodePath = ${q(site).find('footer').property('_path')}
collection = ${q(site).children('footer').children()}
}
}
content {
breadcrumb = TYPO3.Neos:BreadcrumbMenu
sidebar = XY:xy:SidebarItemArray
// The default content section
main = PrimaryContent {
nodePath = 'main'
}
}
}
}
Documents/NewsArticlePage.ts2
prototype(XY:xy:NewsArticlePage) < prototype(XY:xy:Page) {
body.templatePath = 'resource://XY:xy/Private/Templates/Page/NewsArticle.html'
body.parts.title = ${'Lorem: ' + Date.format(q(documentNode).property('articleDate'), 'd.m.Y') }
}
NodeTypes.yaml
'TYPO3.Neos.NodeTypes:Page':
....
properties:
contentImage:
type: TYPO3\Media\Domain\Model\ImageInterface
ui:
label: 'Contentimage'
reloadPageIfChanged: true
inspector:
group: 'contentImage'
EDIT: If I add a articleDate to the NewsArticlePage this error is shown:
Catchable Fatal Error: Object of class DateTime could not be converted to string in /home/marv/Projects/business/erxleben/khporz_relaunch_2016_v2_2/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_TypoScript_TypoScriptObjects_ArrayImplementation.php line 40
EDIT2: I think that output between the head and body tag is the problem. I dont understand why a prototype of a page with no adujstments adds this output 