Project

General

Profile

Actions

Bug #49803

closed

Problems in overriding objects with new property mapper

Added by Georg Ringer over 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2013-07-09
Due date:
% Done:

100%

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

Description

It seems there is a problem with overriding objects when using the new property mapper.

check this code

config.tx_extbase {
    objects {
        GeorgRinger\Testoverride\Domain\Model\Fo {
            className = GeorgRinger\Testoverride\Domain\Model\Bar
        }
    }
}

if the model is used as argument, the "overlay" of Model Bar is missing.

A simple demo extension can be found at: http://montagmorgen.at/fileadmin/tmp/testoverride_0.0.0.zip
Important: the demo exts deactivates the new property mapper in ext_typoscript_setup.txt.

Proof of concept:
  1. Install extension and add plugin to a page
  2. Create a new record in the FE and fill all fields
  3. Disable the new property mapper and add a 2nd record
  4. Exception "#1297759968: Exception while property mapping at property path "":Property "test" was not found in target object of type "GeorgRinger\Testoverride\Domain\Model\Fo"." should be shown.

Files

testoverride.zip (997 KB) testoverride.zip Anja Leichsenring, 2013-10-27 12:48

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #60705: Property of alternative model implementation not foundClosed2014-07-31

Actions
Actions #1

Updated by Gerrit Code Review over 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22135

Actions #2

Updated by Gerrit Code Review over 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22135

Actions #3

Updated by Gerrit Code Review over 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22135

Actions #5

Updated by Marc Bastian Heinrichs over 10 years ago

Ok, had a deeper look at this.
What I don't get, is, why you get a Exception from the rewritten PropertyMapper, but you disabled it.

Also I'm not sure, if objectManagers registerImplemenation is build also for extending models. This will definitly break also in other parts.
Regarding the feature you break with this patch, the backported #30300 - setting a subtype by __type - I would say, this is exactly what you need. But to make this work the function allowOverrideTargetType in MvcPropertyMappingConfiguration is missing ATM.

Actions #6

Updated by Gerrit Code Review about 10 years ago

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

Actions #7

Updated by Alexander Opitz about 10 years ago

  • Project changed from 534 to TYPO3 Core
  • Category set to Extbase
  • TYPO3 Version set to 6.2
  • Is Regression set to No
Actions #8

Updated by Gerrit Code Review about 10 years ago

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

Actions #9

Updated by Gerrit Code Review about 10 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/33327

Actions #10

Updated by Oliver Hader about 10 years ago

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

Updated by Mathias Brodala about 10 years ago

This change should also allow for using interfaces in controller action arguments if an implementation is registered as usual. Previously the type converter tried to create an instance of the interface.

Actions #12

Updated by Gerrit Code Review about 10 years ago

  • Status changed from Resolved 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 http://review.typo3.org/33330

Actions #13

Updated by Gerrit Code Review about 10 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/33331

Actions #14

Updated by Markus Klein about 10 years ago

  • Status changed from Under Review to Resolved
Actions #15

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF