Hey guys,
sorry if this is a stupid question but I dont know what I can do.
Alway when I want to add an Text-Element to a page I got this Server Error:
Call to a member function getContextPath() on null
Error thrown in file
~/xy/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Neos_Service_Controller_NodeController.php in line 420
I have no idea what may be the problem at all …
This is my Root.ts2:
/**
* Root TypoScript template for the xy.xy site
*/
prototype(XYSidebarElement) < prototype(TYPO3.Neos:Content) {
templatePath = 'resource://XY.xy/Private/Templates/TypoScriptObjects/SidebarElement.html'
content = ${q(node).property('content')}
headline = ${q(node).property('headline')}
link = ${Neos.Link.resolveNodeUri(q(node).property('link'), q(node).get(0), this.tsRuntime.controllerContext)}
}
page = Page {
head {
stylesheets.site = TYPO3.TypoScript:Template {
templatePath = 'resource://XY.xy/Private/Templates/Page/Default.html'
sectionName = 'stylesheets'
}
javascripts.site = TYPO3.TypoScript:Template {
templatePath = 'resource://XY.xy/Private/Templates/Page/Default.html'
sectionName = 'headScripts'
}
metadata = TYPO3.TypoScript:Template {
templatePath = 'resource://XY.xy/Private/Templates/Page/Default.html'
sectionName = 'metadata'
}
}
body {
templatePath = 'resource://XY.xy/Private/Templates/Page/Default.html'
sectionName = 'body'
content_image = ${q(node).property('contentImage') ? q(node).property('contentImage') : q(node).parent('[contentImage != ""]').property('contentImage')}
has_sidebar = ${q(node).property('hasSidebar')}
is_live = ${neos:rendering.inBackend()}
parts {
main_menu = TYPO3.Neos:Menu {
templatePath = 'resource://XY.xy/Private/Templates/TypoScriptObjects/MainMenu.html'
current.attributes.class = 'active'
}
header_menu = TYPO3.Neos:Menu {
templatePath = 'resource://XY.xy/Private/Templates/TypoScriptObjects/HeaderMenu.html'
current.attributes.class = 'active'
startingPoint = ${q(site).children('[uriPathSegment="kopfmenu"]').get(0)}
entryLevel = 2
maximumLevels = 1
language_menu = TYPO3.Neos:DimensionMenu {
templatePath = 'resource://XY.xy/Private/Templates/TypoScriptObjects/LanguageMenu.html'
dimension = 'language'
}
}
footer_menu = TYPO3.Neos:Menu {
templatePath = 'resource://XY.xy/Private/Templates/TypoScriptObjects/FooterMenu.html'
current.attributes.class = 'active'
startingPoint = ${q(site).children('[uriPathSegment="fussmenu"]').get(0)}
entryLevel = 2
maximumLevels = 1
}
footer = TYPO3.Neos:ContentCollection {
nodePath = ${q(site).find('footer').property('_path')}
collection = ${q(site).children('footer').children()}
}
}
// These are your content areas, you can define as many as you want, just name them and the nodePath.
content {
breadcrumb = TYPO3.Neos:BreadcrumbMenu
// The default content section
main = PrimaryContent {
nodePath = 'main'
}
sidebar = TYPO3.Neos:ContentCollection {
nodePath = ${q(site).find('sidebar').property('_path')}
collection = ${q(site).children('sidebar').children()}
}
}
share_list {
urls {
twitter = ''
facebook = ''
youtube = ''
google_plus = ''
share = ''
}
}
javascripts.site = TYPO3.TypoScript:Template {
templatePath = 'resource://XY.xy/Private/Templates/Page/Default.html'
sectionName = 'bodyScripts'
}
}
}
NodeTypes:
# If you need more than just the "main" content area you can uncomment the snippet below. It will add a "sidebar" area
# to your pages. You can add as many areas as you like, still only those that are rendered in your TypoScript and
# Template are visible on your page.
#
---
'XY:SidebarElement':
superTypes:
'TYPO3.Neos:Content': TRUE
ui:
label: 'Sidebar Element'
group: 'general'
position: 1
icon: 'icon-file-alt'
inspector:
groups:
document:
label: 'Link'
properties:
content:
type: string
defaultValue: 'Inhalt'
ui:
label: 'Inhalt'
inlineEditable: TRUE
headline:
type: string
defaultValue: ''
ui:
label: 'Überschrift'
inlineEditable: TRUE
link:
type: string
ui:
inspector:
group: 'document'
editor: 'TYPO3.Neos/Inspector/Editors/LinkEditor'
editorOptions:
assets: TRUE
nodeTypes: ['TYPO3.Neos:Shortcut','TYPO3.Neos:Document']
placeholder: 'URL, Seitenname oder Ressourcenname'
'TYPO3.Neos.NodeTypes:Page':
ui:
inspector:
groups:
contentImage:
label: 'Titelbild'
position: 900
sidebar:
label: 'Sidebar'
position: 1000
constraints:
nodeTypes:
'*': TRUE
'XY:SidebarElement': FALSE
properties:
contentImage:
type: TYPO3\Media\Domain\Model\ImageInterface
ui:
label: 'Bild'
reloadPageIfChanged: TRUE
inspector:
group: 'contentImage'
aloha:
'table': []
hasSidebar:
type: boolean
defaultValue: TRUE
ui:
label: 'Display sidebar?'
reloadIfChanged: TRUE
inspector:
group: 'sidebar'
childNodes:
'footer':
label: 'Webseitenfuß'
position: 'end'
type: 'TYPO3.Neos:ContentCollection'
constraints:
nodeTypes:
'TYPO3.Neos.NodeTypes:Text': TRUE
'TYPO3.Neos.NodeTypes:Image': TRUE
'*': FALSE
'sidebar':
type: 'TYPO3.Neos:ContentCollection'
constraints:
nodeTypes:
'*': FALSE
'XY:SidebarElement': TRUE
'XY.MainSite:NewsArticlePage':
superTypes:
'TYPO3.Neos:Document': true
ui:
label: 'News Artikel'
childNodes:
'main':
type: 'TYPO3.Neos:ContentCollection'