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
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)? )
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
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
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
There are no custom elements yet. I only did a new install of V12.
In List-mode I can create a new page (because there are no pages yet, it is an empty query, so no type-checking). After that I get the error-message as soon as I click on ‘Create a new record’.
Same goes for Page-mode: If I created a page, in Page-mode I can create a first element. Choosing a simple “Header only”, it gets saved, but I get an equal error, reading
TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem::getReferenceCount(): Argument #1 ($uid) must be of type int, string given, called in ...../vendor/typo3/cms-backend/Classes/View/BackendLayout/Grid/GridColumnItem.php on line 144
A var_dump in both files of the whole record used ($this->record and $page) shows that both records-sets are interpreted as string-sets, not as the types represented in MySQL (deleted and hidden are also represented as string, for instance)