[BUGFIX] DataHandler: Assign reference default values 50/42550/8
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Wed, 12 Aug 2015 20:55:59 +0000 (22:55 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 19 Aug 2015 10:06:06 +0000 (12:06 +0200)
commit7b9d6c8286925fcc6012ce16d0bd1d568926e0a5
treebac18396b6b3a71a80535331f42b60372085a1b4
parentc0a377490ed725da949de597d21dbd3f59a04b61
[BUGFIX] DataHandler: Assign reference default values

In MySQL stric mode scenarios, relation types not using MM tables
or the foreign_field definition (IRRE) might end up in no
references at all, which is only the trigger for the actual
problem. These references result in a blank string ("") that
is casted in non-strict modes to the accordant field type
defined by the DMBS schema.

In strict mode this has to be handled more specific. Since the
system cannot determine the real meaning automatically, values
for reference that are produced in the mentioned scenario are
now casted to zero (0) or to the default value defined in the
accordant TCA configuration of the field.

Resolves: #69004
Releases: master
Change-Id: I6608f1fe0f63a99caa1208b1d3d76354b6f659cf
Reviewed-on: http://review.typo3.org/42550
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
30 files changed:
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Configuration/TCA/sys_category.php
typo3/sysext/core/Configuration/TCA/sys_collection.php
typo3/sysext/core/Configuration/TCA/sys_file_collection.php
typo3/sysext/core/Configuration/TCA/sys_file_metadata.php
typo3/sysext/core/Configuration/TCA/sys_file_reference.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1ncsv_offer.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1ncsv_price.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1nff_hotel.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1nff_offer.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_1nff_price.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnasym_hotel.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnasym_hotel_offer_rel.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnasym_offer.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnasym_price.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnattr_hotel.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnattr_hotel_offer_rel.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnattr_offer.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnmmasym_hotel.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnmmasym_offer.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnmmasym_price.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnsym_hotel.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Configuration/TCA/tx_irretutorial_mnsym_hotel_rel.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler/Configuration/TCA/tx_testdatahandler_element.php
typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/Blog.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/Post.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/Tag.php
typo3/sysext/frontend/Configuration/TCA/tt_content.php
typo3/sysext/rtehtmlarea/Configuration/TCA/tx_rtehtmlarea_acronym.php