Feature #55869

Allow custom handling of propertyMapping errors

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

Status:Closed Start date:2014-02-11
Priority:Should have Due date:
Assigned To:Bastian Waidelich % Done:

0%

Category:MVC
Target version:-
PHP Version: Complexity:
Has patch:No

Description

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

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


Related issues

related to TYPO3.Flow - Bug #8670: Non-required action argument throws Exception on unknown ... Resolved 2010-08-18
related to Core - Bug #55861: New PropertyMapper must accept not found arguments Under Review 2014-02-11

History

#1 Updated by Marc Bastian Heinrichs over 1 year ago

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

#2 Updated by Bastian Waidelich over 1 year ago

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

#3 Updated by Bastian Waidelich over 1 year 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
  • Assigned To set to Bastian Waidelich
  • Has patch set to No

#4 Updated by Gerrit Code Review over 1 year 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 over 1 year 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 11 months 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 8 months 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 8 months 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 8 months 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 6 months 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 6 months 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