Bug #55861

New PropertyMapper must accept not found arguments

Added by Georg Ringer over 8 years ago. Updated over 3 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

Related to TYPO3.Flow - Feature #55869: Allow custom handling of propertyMapping errorsClosedBastian Waidelich2014-02-11

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

Actions
#1

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27535

#2

Updated by Gerrit Code Review over 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27535

#3

Updated by Andreas Kiessling about 8 years ago

Any news on this one? IMHO a breaking change with the new property mapper!
The fix from Bastian only made it to Flow so far, but we really need this one too :/

#4

Updated by Georg Ringer almost 8 years ago

the change is not yet merged in flow.

#5

Updated by Andreas Kiessling almost 8 years ago

Ah, yes... You're right!
I'd still prefer your patch, as it does not seem to need any new code to handle the issue.

#6

Updated by Florian Schwaiger over 7 years ago

Is this fixed yet or do I have to merge the patch in my project manually?

#7

Updated by Marc Hirdes over 7 years ago

I agree to Florain: Is this fixed yet or do I have to merge the patch in my project manually?

#8

Updated by Marc Hirdes over 7 years ago

?

#9

Updated by Henrik Ziegenhain over 7 years ago

Hi all,

nope, this Issue is not merged or fixed by another one.

The patch from above is working for my specific problem.

#10

Updated by Sven Burkert about 7 years ago

Please fix this soon, this bug is really annoying and it applies to very much extensions.

#11

Updated by Johann Carstens almost 7 years ago

Would be nice if this could be fixed in the next 6.2.xx Version. I just ran into the same problem.

#12

Updated by Klaus Bitto almost 7 years ago

This is a high priority issue also for us.

Is there any official status on the matter?

#13

Updated by Fabian Schöner almost 7 years ago

Im also running in this issue almost daily.

Any official status update or better a quick fix would be highly appreciated!

#14

Updated by Marc Bastian Heinrichs almost 7 years ago

  • Target version changed from 6.2.0 to next-patchlevel

The first patch set is abandoned now.

Please test the new WIP Patch https://review.typo3.org/#/c/39946

#15

Updated by Gerrit Code Review over 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39946

#16

Updated by Gerrit Code Review over 6 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42663

#17

Updated by Anja Leichsenring over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#18

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF