Feature #55869

Allow custom handling of propertyMapping errors

Added by Georg Ringer about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
MVC
Target version:
-
Start date:
2014-02-11
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

This is the forward port of the bug #55861 in TYPO3 CMS.

A typical controller call in TYPO3 CMS 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!


Related issues

Related to TYPO3 Core - Bug #55861: New PropertyMapper must accept not found argumentsClosed2014-02-11

Actions
Related to TYPO3.Flow - Bug #8670: Non-required action argument throws Exception on unknown get-parameter uidResolvedKarsten Dambekalns2010-08-18

Actions
#1

Updated by Marc Bastian Heinrichs about 7 years ago

Fix for the "old" property mapper was handled in #8670

#2

Updated by Bastian Waidelich about 7 years ago

  • Project changed from TYPO3 Flow Base Distribution to TYPO3.Flow
#3

Updated by Bastian Waidelich about 7 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from PropertyMapper must accept not found arguments to Allow custom handling of propertyMapping errors
  • Category set to MVC
  • Status changed from New to Accepted
  • Assignee set to Bastian Waidelich
  • Has patch set to No
#4

Updated by Gerrit Code Review about 7 years ago

  • Status changed from Accepted to Under Review

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

#5

Updated by Gerrit Code Review about 7 years ago

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

#6

Updated by Georg Ringer over 6 years ago

is there any process in the flow group how to get further? IMO this should really really be solved in flow + cms

#7

Updated by Bastian Waidelich over 6 years ago

  • Status changed from Under Review to Needs Feedback

@Georg sorry for the lack of feedback, I lost track of this one.. With #54618 the situation has already improved in that it's now much easier to hook into the error handling.. But https://review.typo3.org/28502 would definitely be very useful still.. Do you have feedback to the patch?

#8

Updated by Gerrit Code Review over 6 years ago

  • Status changed from Needs Feedback to Under Review

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

#9

Updated by Bastian Waidelich over 6 years ago

FYI: The last commit works, but is missing some tests and does not address all previously discussed issues.. Please provide some feedback

#10

Updated by Gerrit Code Review about 6 years ago

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

#11

Updated by Bastian Waidelich about 6 years ago

  • Status changed from Under Review to Closed

I just moved this to https://jira.typo3.org/browse/FLOW-197 and hope to finally resolve this for Flow 3.0!

Also available in: Atom PDF