Project

General

Profile

Actions

Bug #89531

closed

Regression: "Show" in context menu for pages always shows root page on databases not casting return types

Added by Patrick Broens over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Start date:
2019-10-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
no-brainer
Is Regression:
Yes
Sprint Focus:

Description

Since #56351 in V9.5.10 the "Show" link in context menus for pages is not opening the selected page when a database or database driver is used returning only strings, like the default settings of the "pdo_mysql" driver.

The following line from the method getPreviewPid in Web/typo3/sysext/backend/Classes/ContextMenu/ItemProviders/PageProvider.php will always return the second value, since $this->record['sys_language_uid'] is not type casted to an integer before doing the strict comparison, which means always false:

return (int)$this->record['sys_language_uid'] === 0 ? (int)$this->record['uid'] : (int)$this->record['l10n_parent'];

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #56351: view page in another language than default language from Backend is incorrectClosed2014-02-26

Actions
Actions

Also available in: Atom PDF