Skip to content
Snippets Groups Projects
Commit 15944c9c authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Check if shortcuts' target table still exists

The shortcut links in the toolbar contain an icon,
which gets calculated based on the backend module
and the record type, the shortcut was created for.

Since IconFactory->getIconForRecord() is used to
fetch the correct record type icon, the database
row has to be provided. This was previously done
by simply querying the table with an uid constraint.
In case the table, the shortcut was initially created
for, does not longer exist, e.g. since a third-party
extension was removed, this led to an exception.

The database row is therefore now fetched using
BackendUtility::getRecordWSOL(), which checks
if the table is (still) configured in TCA, since this is
anyways a prerequisite for using getIconForRecord()
and for working with shortcuts - Especially when
`record_edit` is the target module.

As a positive side effect of this change, a possible
workspace version is now also taken into account,
when generating the record icon.

Resolves: #94286
Releases: master, 10.4
Change-Id: I1d6e1327f10ad06863ef7f5bb1e3706a3f10bcfe
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69416


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarJochen <rothjochen@gmail.com>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarJochen <rothjochen@gmail.com>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
parent cd616331
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment