Bug #55861

New PropertyMapper must accept not found arguments

Added by Georg Ringer over 1 year ago. Updated 2 months ago.

Status:Under Review Start date:2014-02-11
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:Extbase Spent time: -
Target version:next-patchlevel
TYPO3 Version:6.2 Is Regression:No
PHP Version: Sprint Focus:
Complexity:

Description

A typical controller call looks like this

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

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 errors Closed 2014-02-11
duplicated by news extension - Bug #55837: Non-existent item shouldn't throw 500 error Closed 2014-02-10
duplicated by news extension - Bug #62951: Request of hidden or deleted news-detail runs in an excep... Closed 2014-11-14

History

#1 Updated by Gerrit Code Review over 1 year 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 1 year 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 1 year 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 about 1 year ago

the change is not yet merged in flow.

#5 Updated by Andreas Kiessling about 1 year 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 11 months ago

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

#7 Updated by Marc Hirdes 10 months 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 10 months ago

?

#9 Updated by Henrik Ziegenhain 10 months 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 4 months ago

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

#11 Updated by Johann Carstens 2 months 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 B 2 months ago

This is a high priority issue also for us.

Is there any official status on the matter?

#13 Updated by Fabian Schöner 2 months 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 2 months 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

Also available in: Atom PDF