0

複数列のようなカスタム ノード タイプを作成しようとしましたが、デフォルトContentCollectionを追加のプロパティで拡張する必要があります。バックエンドとフロントエンドのビューはこれまでのところ機能しています。しかし、 のプロパティspanContentCollection変更された場合、エディターは JavaScript タイムアウト エラーで実行されます。コンソールにエラーや警告はありません。

エラーメッセージ:

警告: スクリプトに応答していません

Ein Skript auf dieser Seite ist eventuell beschäftigt order es antwortet nicht mehr. Sie können das Skript jetzt stoppen, im Debugger offfnen order weiter ausführen.

スクリプト: http://domain.com/_Resources/Static/Packages/TYPO3.Neos/JavaScript/ContentModule-built.js:389

再現するには、次のようにします。

サイトパッケージ「TYPO3.NeosDemoTypo3Org」を使用。TYPO3 ネオス v1.1.2。パッケージ「Selector.Test」を作成します

構成/Settings.yaml

TYPO3:
  Neos:

    typoScript:
      autoInclude:
        'Selector.Test': TRUE

    nodeTypes:
      groups:
        selectorTest:
          label: 'Selector Test'
          position: 10

構成/NodeTypes.Columns.yaml

'Selector.Test:RowAbstract':
  abstract: TRUE
  superTypes:
    - 'TYPO3.Neos:Content'
  ui:
    label: 'Columns'
    group: 'selectorTest'
    icon: 'icon-columns'
    inlineEditable: TRUE
    inspector:
      groups:
        columnSettings:
          label: 'Column settings'
          position: 10

# Create a custom ContentCollection
'Selector.Test:ColumnContentCollection':
  superTypes:
    - 'TYPO3.Neos:ContentCollection'
  ui:
    label: 'Column Content Collection'
    icon: 'icon-list'
    inlineEditable: TRUE
    inspector:
      groups:
        columnSpan:
          label: 'Column span'
          position: 10
  properties:
    span:
      type: string
      defaultValue: ''
      ui:
        label: 'Span'
        reloadIfChanged: TRUE
        inspector:
          group: 'columnSpan'

# Define row with custom ContentCollection
'Selector.Test:Row':
  superTypes:
    - 'Selector.Test:RowAbstract'
  childNodes:
    column0:
      type: 'Selector.Test:ColumnContentCollection'
    column1:
      type: 'Selector.Test:ColumnContentCollection'

リソース/プライベート/TypoScript/Root.ts2

prototype(Selector.Test:Row) < prototype(TYPO3.Neos:Content) {

    templatePath = 'resource://Selector.Test/Private/Templates/NodeTypes/Row.html'

    attributes {
        class = 'row'
    }

    columns = TYPO3.TypoScript:Collection {
        collection = ${q(node).children('[instanceof TYPO3.Neos:ContentCollection]')}
        itemRenderer = Selector.Test:Column
        itemName = 'node'
    }
}

prototype(Selector.Test:Column) < prototype(TYPO3.TypoScript:Template) {

    node = ${node}
    templatePath = 'resource://Selector.Test/Private/Templates/NodeTypes/Column.html'

    attributes = TYPO3.TypoScript:Attributes {
        class.span = ${q(node).property('span') ? q(node).property('span') : null}
    }

    columnContentCollection = TYPO3.Neos:ContentCollection {
        nodePath = '.'
    }
}

リソース/プライベート/テンプレート/NodeTypes/Column.html

{namespace ts=TYPO3\TypoScript\ViewHelpers}
<div{attributes -> f:format.raw()}>
    <ts:render path="columnContentCollection" />
</div>

リソース/プライベート/テンプレート/NodeTypes/Row.html

{namespace ts=TYPO3\TypoScript\ViewHelpers}
<div{attributes -> f:format.raw()}>
    <ts:render path="columns" />
</div>
4

1 に答える 1

0

これは、この Jira issueで説明されている問題のようです。残念ながらまだ解決されていませんが、暫定的な解決策が公開された変更として存在します (レビュー用): https://review.typo3.org/#/c/31244/

その変更を TYPO3.Neos パッケージに適用して、問題が解決する場合はフィードバックを提供してください。そうすれば、次の Neos リリースに組み込むことができます。

于 2014-12-08T09:43:51.953 に答える