Hi all,
TYPO3 12.4,
upgraded in sequence started at 7.6 long ago
not composer based install, “old school” = curl-ing current typo3 src gz, unpack, and change symbolic link to typo3_src.
Everything working as expected, all “green” in Backend.
But I detected after removing some stuff I don’t need anymore that I’ve some orphaned records, shown in Backend System->DB Check->Database Relations.
ChatGPT mentions some Backend web based cleanup commands, can’t find, maybe AI fantasy
But found the docs about “lowlevel” extension: Command line — Low Level 12.4 documentation and there the option cleanup:orphanrecords
.
Following this doc I can see that the CLI util itself works, but not as expected:
Testing 1st itself shows:
vserver:/srv/www/htdocs/typo3root/typo3_src/typo3/sysext/core/bin # ./typo3
TYPO3 CMS 12.4.27 (Application Context: Production) - PHP 8.2.28
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
list Lists commands
help Displays help for a command
dumpautoload [extensionmanager:extension:dumpclassloadinginformation|extension:dumpclassloadinginformation] Updates class loading information in non-composer mode.
setup Setup TYPO3 via CLI.
backend
backend:user:create Create a backend user
backend:lock Lock the TYPO3 Backend
backend:resetpassword Trigger a password reset for a backend user
backend:unlock Unlock the TYPO3 Backend
cache
cache:warmup Cache warmup for all, system or, if implemented, frontend caches.
cache:flush Cache clearing for all, system or frontend caches.
extension
extension:list Shows the list of extensions available to the system
extension:setup Set up extensions
language
language:update Update the language files of all activated extensions
mailer
mailer:spool:send [swiftmailer:spool:send] Sends emails from the spool
messenger
messenger:consume Consume messages
referenceindex
referenceindex:update Update the reference index of TYPO3
site
site:list Shows the list of sites available to the system
site:show Shows the configuration of the specified site
upgrade
upgrade:run Run upgrade wizard. Without arguments all available wiz
But nearly anything else, “meaningful”, fails or is incomplete:
./typo3 extension:list
shows just a small subset of all extensions. FYI not that many, small private site.
./typo3 site:list
shows “no sites”, although there are 2.
The desired clean orphan records fails completely:
vserver:/srv/www/htdocs/typo3root/typo3_src/typo3/sysext/core/bin # ./typo3 cleanup:orphanrecords -vv --dry-run
Uncaught TYPO3 Exception Too few arguments to function TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory::__construct(), 0 passed in /srv/www/typo3_src-12.4.27/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 2985 and exactly 2 expected
thrown in file /srv/www/typo3_src-12.4.27/typo3/sysext/core/Classes/DataHandling/SoftReference/SoftReferenceParserFactory.php
in line 33
Searching here in forum I’ve found this at 1st seeming similar post: Error updating extensions for typo3 v 13.1.1
Similar, as exactly the same error message I’m getting, but if I do what @kentingey asked, typo3 referenceindex:update
, I’m NOT getting the “Too few arguments” error but:
vserver:/srv/www/htdocs/typo3root/typo3_src/typo3/sysext/core/bin # ./typo3 referenceindex:update
In ConnectionPool.php line 143:
The requested database connection named "Default" has not been configured.
referenceindex:update [-c|--check]
And also when following @mabolek 's hint for cache:flush
I’m getting the “database connection not configured” error above.
Which is NOT the case in general, as of course my Database connection “Default” is configured and unchanged since ~2015/16, settings are correctly defined in typo3conf/system/settings.php
. As said, in Backend everything is working… would be difficult without a valid DB connection In Backend, I can delete / flush etc. all caches, and did this before and while trying the CLI as described.
Any hints why the CLI does not “recognize” the DB Connection, and producing the Too few arguments errors?