./flow node:repair php error

Hey there,

I’m using Neos 2.2 and ran into an error while trying to repair some nodes.
Here is my error message:

./flow node:repair                                      
Run integrity checks related to Neos features

Catchable Fatal Error: Argument 1 passed to TYPO3\Flow\Utility\PositionalArraySorter::__construct() must be of the type array, null given, called in /Applications/mampstack-5.5.35-1/apps/demo/htdocs/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_TYPO3CR_Domain_Service_ConfigurationContentDimensionPresetSource.php on line 38 and defined in /Applications/mampstack-5.5.35-1/apps/demo/htdocs/Packages/Libraries/neos/utility-arrays/Classes/TYPO3/Flow/Utility/PositionalArraySorter.php line 85

  Type: TYPO3\Flow\Error\Exception
  Code: 1
  File: Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Error/ErrorHandler.php
  Line: 80

Open Data/Logs/Exceptions/20160516225955272efe.txt for a full stack trace.

If needed, I’m going to post the full stack trace.
What can I do?

Sounds like you have invalid configuration.

It might be possible to find using ./flow configuration:validate --type NodeTypes

If not you should either debug the code or remove some of your configuration to see if that helps.

Thanks for answering.

I checked the configuration and everything is fine:

./flow configuration:validate --type NodeTypes
Validating NodeTypes configuration

All Valid!

I’m posting the full stack trace and hope it helps:

cat Data/Logs/Exceptions/20160517070550b9b641.txt
Exception #1 in line 85 of /Applications/mampstack-5.5.35-1/apps/demo/htdocs/Packages/Libraries/neos/utility-arrays/Classes/TYPO3/Flow/Utility/PositionalArraySorter.php: Catchable Fatal Error: Argument 1 passed to TYPO3\Flow\Utility\PositionalArraySorter::__construct() must be of the type array, null given, called in /Applications/mampstack-5.5.35-1/apps/demo/htdocs/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_TYPO3CR_Domain_Service_ConfigurationContentDimensionPresetSource.php on line 38 and defined in /Applications/mampstack-5.5.35-1/apps/demo/htdocs/Packages/Libraries/neos/utility-arrays/Classes/TYPO3/Flow/Utility/PositionalArraySorter.php line 85

32 TYPO3\Flow\Error\ErrorHandler::handleError(4096, "Argument 1 passed to TYPO3\Flow\Utility\PositionalArraySorter::__construct() must be of the type array, null given, called in /Applications/mampstack-5.5.35-1/apps/demo/htdocs/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_TYPO3CR_Domain_Service_ConfigurationContentDimensionPresetSource.php on line 38 and defined", "/Applications/mampstack-5.5.35-1/apps/demo/htdocs/Packages/Libraries/neos/utility-arrays/Classes/TYPO3/Flow/Utility/PositionalArraySorter.php", 85, array|0|)
31 TYPO3\Flow\Utility\PositionalArraySorter::__construct(NULL)
30 TYPO3\TYPO3CR\Domain\Service\ConfigurationContentDimensionPresetSource_Original::getAllPresets()
29 call_user_func_array(array|2|, array|0|)
28 TYPO3\Flow\Object\DependencyInjection\DependencyProxy::__call("getAllPresets", array|0|)
27 TYPO3\Flow\Object\DependencyInjection\DependencyProxy::getAllPresets()
26 TYPO3\TYPO3CR\Domain\Service\ContentDimensionCombinator_Original::getAllAllowedCombinations()
25 call_user_func_array(array|2|, array|0|)
24 TYPO3\Flow\Object\DependencyInjection\DependencyProxy::__call("getAllAllowedCombinations", array|0|)
23 TYPO3\Flow\Object\DependencyInjection\DependencyProxy::getAllAllowedCombinations()
22 TYPO3\Neos\Command\NodeCommandControllerPlugin_Original::generateUriPathSegments("live", FALSE)
21 TYPO3\Neos\Command\NodeCommandControllerPlugin_Original::invokeSubCommand("repair", TYPO3\Flow\Cli\ConsoleOutput, NULL, "live", FALSE, TRUE)
20 TYPO3\TYPO3CR\Command\NodeCommandController_Original::repairCommand(NULL, "live", FALSE, TRUE)
19 call_user_func_array(array|2|, array|4|)
18 TYPO3\Flow\Cli\CommandController_Original::callCommandMethod()
17 TYPO3\Flow\Cli\CommandController_Original::processRequest(TYPO3\Flow\Cli\Request, TYPO3\Flow\Cli\Response)
16 TYPO3\Flow\Mvc\Dispatcher_Original::initiateDispatchLoop(TYPO3\Flow\Cli\Request, TYPO3\Flow\Cli\Response)
15 TYPO3\Flow\Mvc\Dispatcher_Original::dispatch(TYPO3\Flow\Cli\Request, TYPO3\Flow\Cli\Response)
14 TYPO3\Flow\Cli\CommandRequestHandler::TYPO3\Flow\Cli\{closure}()
13 Closure::__invoke()
12 TYPO3\Flow\Security\Context_Original::withoutAuthorizationChecks(Closure)
11 TYPO3\Flow\Security\Context::withoutAuthorizationChecks(Closure)
10 call_user_func_array(array|2|, array|1|)
9 TYPO3\Flow\Security\Context::Flow_Aop_Proxy_invokeJoinPoint(TYPO3\Flow\Aop\JoinPoint)
8 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
7 TYPO3\Flow\Session\Aspect\LazyLoadingAspect_Original::callMethodOnOriginalSessionObject(TYPO3\Flow\Aop\JoinPoint)
6 TYPO3\Flow\Aop\Advice\AroundAdvice::invoke(TYPO3\Flow\Aop\JoinPoint)
5 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
4 TYPO3\Flow\Security\Context::withoutAuthorizationChecks(Closure)
3 TYPO3\Flow\Cli\CommandRequestHandler::handleRequest()
2 TYPO3\Flow\Core\Bootstrap::run()
1 require("/Applications/mampstack-5.5.35-1/apps/demo/htdocs/Packages/Framework/TYPO3.Flow/Scripts/flow.php")

Seems like invalid content dimension configuration.

So it’s not NodeTypes but Settings.

./flow configuration:validate --type Settings might work, but likely not.

Check it with ./flow configuration:show --type Settings --path TYPO3.TYPO3CR.contentDimensions

If you can’t see what’s wrong, then start debugging the code.

I have the same error: all I have done is install Neos using composer and then added database and backend user credentials. I used Neos’ setup process to create a blank site.

I log in, add a Text node to a page, and most Ajax actions (save, update, publish) return this error.

Catchable Fatal Error: Argument 1 passed to TYPO3\\Flow\\Utility\\PositionalArraySorter::__construct() must be of the type array, null given, called in [PROJECT ROOT]/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_TYPO3CR_Domain_Service_ConfigurationContentDimensionPresetSource.php on line 38 and defined in [PROJECT ROOT]/Packages/Libraries/neos/utility-arrays/Classes/TYPO3/Flow/Utility/PositionalArraySorter.php line 85

Tracing it through, it seems to indicate that $this->configuration is null in Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_TYPO3CR_Domain_Service_ConfigurationContentDimensionPresetSource.php.

Adding a new domain doesn’t help.

Can’t reproduce the issue unfortunately.

Something is wrong with the dependency injection of the configuration for some odd reason.

Which seems to happen because the wrong class is used, likely related to incorrect package ordering.

Make sure you flush the cache ./flow flow:cache:flush --force and maybe even a ./flow package:rescan. Or try removing Configuration/PackageStates.php.

Lastly try adding the following to Packages/Application/TYPO3.TYPO3CR/Configuration/Objects.yaml, it’s a workaround but should fix it.

TYPO3\TYPO3CR\Domain\Service\ConfigurationContentDimensionPresetSource:
  properties:
    configuration:
      setting: TYPO3.TYPO3CR.contentDimensions

I’m having exactly the same issue here with a clean, fresh installation of neos!
What can I do about that?

Run ./flow package:rescan

Hey there,

Not sure if I should create a new thread but I’m having the same issue.

Running ./flow package:rescan fails with:

Unrecognized Command

Sorry, but he command "typo3.flow:package:rescan" must be specified by its full command
identifier because it is a compile time command which cannot be resolved
from an abbreviated command identifier.

Any suggestions?

You need to call the command as ./flow flow:package:rescan

Bingo! Thank you

It’s just me or the error message is a bit akward here ?

1 Like

I have stumbled over this multiple times but it cannot be changed. The problem is that those commands are designated as compile time commands and therefore need to be identified very early. If called with the short name Flow starts off a runtime run and then figures out that the command is designated compile time (so it can tell you what to run) and then shuts down.

I have been thinking to try if we couldn’t just run the correct command in a subrequest and just return the output. If the command handling managed to get through to the point to output this message everything in the installation seems alright and it shouldn’t be a problem to do that…

3 Likes