FriendsOfTYPO3 / tt_address

Add address / contact datasets to your content management system.
GNU General Public License v2.0
39 stars 75 forks source link

Cannot add new address record in TYPO3 v12 PHP 8.2 #511

Closed MisterMarlu closed 9 months ago

MisterMarlu commented 9 months ago

Bug Report

Current Behavior I click on "new record", select the tt-address and get an exception. image

Expected behavior/output The default edit/create view should appear.

Environment

Possible Solution The issue is located in Classes/Hooks/Tca/Label.php line 33. Maybe check if it's a new record or an existing one. For new records the old code should be used, for existing ones the new code should be used.

public function getAddressLabel(array &$params): void
{
    // ...

        if (is_numeric($params['row']['uid'])) {
            $row = BackendUtility::getRecord('tt_address', (int) $params['row']['uid']);
        } else {
            $row = $params['row'];
        }
    // ...
}
MTeskeIn commented 9 months ago

I've got the exact same issue with the same environment specifications.