Project

General

Profile

Actions

Bug #55861

closed

New PropertyMapper must accept not found arguments

Added by Georg Ringer about 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
Start date:
2014-02-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

A typical controller call looks like this

    /**
     * Single view of a news record
     *
     * @param Tx_News_Domain_Model_News $news news item
     * @param integer $currentPage current page for optional pagination
     * @return void
     */
    public function detailAction(Tx_News_Domain_Model_News $news = NULL, $currentPage = 1) {
}

As long as no news property or a correct uid is given everything is ok but if the record can't be found, the exception

Exception while property mapping at property path "":Object with identity "3" not found.
is thrown.

There is currently no way for an extension, to handle this error in the own code! It is very normal, that records get deleted, set to hidden or what so ever. Therefore it must be up to the extension if a default value is set (like NULL) to return NULL by the property mapper!

This behaviour has been introduced with the new property mapper, disabling it makes it work fine again (which is of course no choice at all)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #70610: PropertyMapper directly throws TargetNotFoundExceptionClosed2015-10-12

Actions
Actions

Also available in: Atom PDF