Inspector for TYPO3.Neos:Content attached to Page as childnode won't work

Hello, i’m beginning by journey with Neos and have problem:

My default Page will have teaser which contains image carousel,content container and few properties. Simplified NodeTypes.yaml looks like:

'BWS.Neos:Page':
  superTypes:
    'TYPO3.Neos.NodeTypes:Page': TRUE
  ui:
    label: 'Page BWS.Neos'
  childNodes:
    'teaser':
      type: 'BWS.Neos:Teaser'
      position: 'before main'
'BWS.Neos:Teaser':
  superTypes:
    'TYPO3.Neos:Content': TRUE
  ui:
    group: 'none'
    label: 'Header'
    inspector:
      groups:
        'params':
          label: 'Parameters'
          position: 10
  childNodes:
    'images':
      type: 'BWS.Neos:ImageCollection'
    'texts':
      type: 'TYPO3.Neos:ContentCollection'
      constraints:
        nodeTypes:
          '*': FALSE
          'TYPO3.Neos.NodeTypes:Headline': TRUE
          'TYPO3.Neos.NodeTypes:Text': TRUE
  properties:
    'theme':
      type: string
      defaultValue: 'light'
      ui:
        label: 'Theme Color'
        inspector:
          group: 'params'
          editor: 'TYPO3.Neos/Inspector/Editors/SelectBoxEditor'
          editorOptions:
            values:
              light:
                label: 'Light'
              dark:
                label: 'Dark'
    'gradient':
      type: boolean
      ui:
        label: 'Show gradient'
        inspector:
          group: 'params'

My problem is that inspector frame wont update when i click on page ‘teaser’ childnode, everything inside that node is working fine. After some research i’ve find out that is somehow connected with superType ‘TYPO3.Neos:Content’ (i’ve tested with ContentCollection and it was working but by definition that element should’nt be expandable by user so Content was best bet here). Can someone help me what i’m doing wrong?

Hello Jakub,

can you select the item in the content section or do you select the teaser with the structure-module?

It is a limitation of the current ui that structure is only a helper to select the node in the content section an the inspector will update once this is done.

To get this working you have to manually add the contentElementWrapping to your Fusion-Prototype if you do’nt inherit from TYPO3.Neos:Content like so:

prototype(BWS.Neos:Teaser) < prototype(TYPO3.Neos:Template) {
    .... 
    @process.contentElementWrapping = TYPO3.Neos:ContentElementWrapping
}

Regards, Martin

Hi, thanks for response Martin,
my concept was to edit properties from structure module - there is nothing to edit inline for teaser content itself. Anyway, i can’t select it on structure nor inline. Another problem is that i have inherited Content prototype for that teaser as you can see in Fusion below:

namespace: Site=BWS.Neos
prototype(Site:Teaser) < prototype(Content) {
 theme = ${q(node).property('theme')}
 gradient = ${q(node).property('gradient')}
 images = ContentCollection {
  nodePath = 'images'
  attributes.class = 'cnt-header-carousel'
 }
 texts = ContentCollection {
  nodePath = 'texts'
 }
 prototype(TYPO3.Neos.NodeTypes:Image){
  templatePath = 'resource://BWS.Neos/Private/Templates/TypoScriptObjects/TeaserImage.html'
 }
}

page = TYPO3.Neos:Page {
[...]
 body {
  templatePath = 'resource://BWS.Neos/Private/Templates/Page/Default.html'
  partialRootPath = 'resource://BWS.Neos/Private/Partials'
  sectionName = 'body'
  parts {
   menu = TYPO3.Neos:Menu {
    templatePath = 'resource://BWS.Neos/Private/Templates/TypoScriptObjects/MainMenu.html'
   }
  }
  phone = ${q(site).property('phone')}
  email = ${q(site).property('email')}
  content {
   main = TYPO3.Neos:PrimaryContent {
    nodePath = 'main'
   }
   teaser = Site:Teaser {
    node = ${q(node).children('teaser')}
   }
  }
[...]
}

Earlier i’ve had different configuration (where nodePath points to “teaser/images”, “fQ.children(‘teaser’)”, etc.) but when i changed paths teaser worked fine as standalone content (not attached as childnode to Page), when connected with Page, it gives me error:

An exception was thrown while Neos tried to render your pageNo
 content collection of type TYPO3.Neos:ContentCollection could be found 
in the current node (/sites/neos) or at the path "texts". You might want
 to adjust your node type configuration and create the missing child 
node through the "flow node:repair --node-type BWS.Neos:Homepage" 
command.page<TYPO3.Neos:Page>/
 body<TYPO3.TypoScript:Template>/
  content/
   teaser<BWS.Neos:Teaser>/
    texts/
     __meta/
      context/
       node<>/

Ofcourse i used node:repair and nothing happened. My idea is that right now i have bad context for teaser attached to page as childnode and i don’t know how to change that.

tl;dr - Property editing for content “Teaser” as standalone works but nothing happened when that content is childnode for Page. Maybe there is need for context (this or node or whatever it is) change for “page/body/content/teaser”.