V12: Argument must be int, string given

After installing V12.4, I get several errors when trying to create new content-elements, files or other elements. I installed Typo3 from the CLI with the command

composer create “typo3/cms-base-distribution:^12” --prefer-dist

Basically the error is that core-files are hard-coded with declare(strict_types=1);. The error when arguments come from a query. They are interpreted as string instead of int.

Why am I getting these errors? (Compiled in my version of Php? / Configuration-settings in php-ini? / Configuration of database-connection (PDO)? )

Hi, can you post the detailed exception with error message incl. call stack (as text or screenshot, as you like)?
Best regards
Max

1 Like

Hello Max,

Thank you for thinking along. Here is the copied text. I included an screenshot as well.

In the mean time I found out that the error occurres in List-mode. In page-mode I get the normal options of content-elements. But I am used to the List-mode because it is more convenient to me. If not for content-elements, what should be the records that can be created in List-mode?

503

Oops, an error occurred!

TYPO3\CMS\Core\DataHandling\PageDoktypeRegistry::isRecordTypeAllowedForDoktype(): Argument #2 ($doktype) must be of type ?int, string given, called in /home/gertrqt345/domains/servizz.net/public_html/dashboard.12/vendor/typo3/cms-backend/Classes/Controller/NewRecordController.php on line 577

.

(attachments)

Thanks for providing the information! First of all: Have you tried flushing the cache and updating the database schema in the Maintenance module?

If I understand this correctly, this is a simple TYPO3 site without any extensions installed yet. Is that correct? If not, can you tell us something about your setup, i.e. which extensions you have installed or how you have set up your sitepackage?

Yes, this is a fresh installation of version 12. No other extensions are installed yet.

As it didn’t work at first instance, I cleared the directory and installed it again.
I created two pages in the root (one folder, one root-page) On both pages I got the same error.
In Maintenance=> Analyze database everything is ok.
Nothing else is configured yet. The site-configuration is auto-generated

This is the log:

Core:
	 Exception handler (WEB): Uncaught TYPO3 Exception: TYPO3\CMS\Core\DataHandling\PageDoktypeRegistry::isRecordTypeAllowedForDoktype():
	 Argument #2 ($doktype) must be of type ?int, string given, called in ..../vendor/typo3/cms-backend/Classes/Controller/NewRecordController.php on line 577 | TypeError thrown in file ..../vendor/typo3/cms-core/Classes/DataHandling/PageDoktypeRegistry.php in line 84. 
	 Requested URL: https:..../typo3/record/new?token=--AnonymizedToken--&id=1&returnUrl=/dashboard.12/public/typo3/module/web/list?token%3D--AnonymizedToken--%26id%3D1%26table%3D%26pointer%3D1