Skip to content

Commit

Permalink
[BUGFIX] Allow persisting PseudoFileReference via database form finisher
Browse files Browse the repository at this point in the history
To "encapsulate" resources that were uploaded using a form element, a
new PseudoFileReference class was introduced in TYPO3-CORE-SA-2021-002,
extending Extbase's FileReference domain model.

When trying to persist those files using Extbase's PersistenceManager,
the corresponding database table is assumed to be (inferred from class)
`tx_form_mvc_property_typeconverter_pseudofilereference` instead of
correct `sys_file_reference`.

In order to solve this issue, a corresponding mapping for the new domain
model is introduced.

Resolves: #94153
Releases: master, 10.4, 9.5
Change-Id: I8325a5c78e1e2e37ff75711a10725be796c22d9d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69179
Tested-by: core-ci <typo3@b13.com>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
  • Loading branch information
ohader committed May 19, 2021
1 parent 0b41b5a commit 65f310f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion typo3/sysext/form/Configuration/TypoScript/setup.typoscript
@@ -1,3 +1,15 @@
config.tx_extbase {
persistence {
classes {
TYPO3\CMS\Form\Mvc\Property\TypeConverter\PseudoFileReference {
mapping {
tableName = sys_file_reference
}
}
}
}
}

plugin.tx_form {
view {
# Note that this configuration only affects the EXT:Form plugin
Expand Down Expand Up @@ -30,4 +42,4 @@ lib.tx_form.contentElementRendering {
tables = tt_content
source.current = 1
dontCheckPid = 1
}
}

0 comments on commit 65f310f

Please sign in to comment.