neos-development-collection icon indicating copy to clipboard operation
neos-development-collection copied to clipboard

Bug Node::countChildNodes($nodeTypeConstraints) doesnt work.

Open mhsdesign opened this issue 3 years ago • 0 comments

findChildNodes is corrently implemented, but countChildNodes doesnt transform the argument $nodeTypeConstraints NodeTypeConstraints to a string for the legacy api:

this snipped must be included:

$filter = $nodeTypeConstraints !== null ? $nodeTypeConstraints->asLegacyNodeTypeFilterString() : null;

without that, the NodeTypeConstraints is passed further down, and due to lack of typesafety it fails at the last moment:

Argument 2 passed to Neos\Utility\Arrays::trimExplode() must be of the type string, object given, called in /tmp/neos/Development/SubContextddev/Cache/Code/Flow_Object_Classes/Neos_ContentRepository_Domain_Repository_NodeDataRepository.php on line 1127

since ever? iguess

mhsdesign avatar Sep 08 '22 17:09 mhsdesign