Bug #49803
Problems in overriding objects with new property mapper
Status: | Resolved | Start date: | 2013-07-09 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | Extbase | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 6.2 | Is Regression: | No | |
PHP Version: | Sprint Focus: | |||
Complexity: |
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
.
- Install extension and add plugin to a page
- Create a new record in the FE and fill all fields
- Disable the new property mapper and add a 2nd record
- 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.
Related issues
Associated revisions
[BUGFIX] Property of alternative model implementation not found
The PersistentObjectConverter is mapping submitted data to a
given target domain model. If a class gets overloaded with
config.tx_extbase.objects, this information is not forwarded
to the ReflectionService. That's why properties in alternative
implementations cannot be determined.
Resolves: #49803
Releases: master, 6.2, 6.1
Change-Id: Ia4ec3a6c6f5bc6c07717a4956ab12e3e779c3c5a
Reviewed-on: http://review.typo3.org/31920
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
[BUGFIX] Property of alternative model implementation not found
The PersistentObjectConverter is mapping submitted data to a
given target domain model. If a class gets overloaded with
config.tx_extbase.objects, this information is not forwarded
to the ReflectionService. That's why properties in alternative
implementations cannot be determined.
Resolves: #49803
Releases: master, 6.2, 6.1
Change-Id: Ia4ec3a6c6f5bc6c07717a4956ab12e3e779c3c5a
Reviewed-on: http://review.typo3.org/33327
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
[BUGFIX] Fix unit tests for TypeConverter classes
The patch Ia4ec3a6c6f5bc6c07717a4956ab12e3e779c3c5a didn't adjust the
unit tests. This fix adds the missing mocks.
Resolves: #49803
Releases: master, 6.2
Change-Id: I829e62eaf3b172edeb295da57093b424edb13d40
Reviewed-on: http://review.typo3.org/33330
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
[BUGFIX] Fix unit tests for TypeConverter classes
The patch Ia4ec3a6c6f5bc6c07717a4956ab12e3e779c3c5a didn't adjust the
unit tests. This fix adds the missing mocks.
Resolves: #49803
Releases: master, 6.2
Change-Id: I829e62eaf3b172edeb295da57093b424edb13d40
Reviewed-on: http://review.typo3.org/33331
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
History
#1 Updated by Gerrit Code Review about 2 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
#2 Updated by Gerrit Code Review about 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22135
#3 Updated by Gerrit Code Review about 2 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22135
#4 Updated by Anja Leichsenring almost 2 years ago
- File testoverride.zip added
#5 Updated by Marc Bastian Heinrichs over 1 year 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.
#6 Updated by Gerrit Code Review 11 months 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
#7 Updated by Alexander Opitz 11 months ago
- Project changed from Extbase MVC Framework to Core
- Category set to Extbase
- TYPO3 Version set to 6.2
- Is Regression set to No
#8 Updated by Gerrit Code Review 10 months 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
#9 Updated by Gerrit Code Review 10 months 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
#10 Updated by Oliver Hader 10 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 094cc0c13867eb6ec7c9eb4fea22757ba23a65cb.
#11 Updated by Mathias Brodala 10 months 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.
#12 Updated by Gerrit Code Review 10 months 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
#13 Updated by Gerrit Code Review 10 months 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
#14 Updated by Markus Klein 10 months ago
- Status changed from Under Review to Resolved
Applied in changeset 03cb9701041da280746d310a7bd2a48241f98a49.