[Neos] Why not to subclass TYPO3.Neos:ContentCollection?
Marcin Ryzycki
marcin at ryzycki.com
Fri Feb 7 04:13:10 CET 2014
On 2014-01-24 02:07:43 pm +0000, Christian Müller said:
>> In NodeTypes.yaml inside TYPO3.Neos package it's stated:
>>
>> # Cannot be subclassed.
>> 'TYPO3.Neos:ContentCollection':
>
> Might be that we need to evaluate that again. Shortly before the 1.0
> release the ContentCollection rendering was heavily modified, it could
> be the case that before something was hardcoded that no longer is
> hardcoded now. I will try to follow up with that and find out if the
> comment can be removed.
Hi Christian,
I actually didn't follow up with that - there are some issues there.
Basically, when you extend TYPO3.Neos:ContentCollection it works in
terms of rendering properly collection of nodes inside.
But, when you add some UI inspector properties to it, there's
JavaScript error when you click on [APPLY] button in inspector:
Uncaught RangeError: Maximum call stack size exceeded in ext-direct.js.
Seems like encodeString() is called in infinite loop. The error is the
same if you add some properties directly to
TYPO3.Neos:ContentCollection - so it actually doesn't matter if it's
subclassed or not.
I did dummy package with an example for that if you'd like to follow up:
https://github.com/ryzy/MR.ContentCollection
Regards,
M.
More information about the Neos
mailing list