#78211AbstractTreeView: Call to a member function isInWebMount() throwed FATAL
Description
Hey,
i had used the code Example from:
https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Examples/PageTrees/Index.html
At the first time, all was fine.
But After logout from the Backend, the Controller Throwed a FATAL error.
Fatal error: Call to a member function isInWebMount() on a non-object in /var/www/paramize/typo3_episch/vendor/typo3/cms/typo3/sysext/backend/Classes/Tree/View/+AbstractTreeView.php on line 756+
while ($crazyRecursionLimiter > 0 && ($row = $this->getDataNext($res))) {
$pageUid = ($this->table === 'pages') ? $row['uid'] : $row['pid'];
if (!$this->getBackendUser()->isInWebMount($pageUid)) {
// Current record is not within web mount => skip it
continue;
}
The Fix is maybe:
while ($crazyRecursionLimiter > 0 && ($row = $this->getDataNext($res))) {
$pageUid = ($this->table === 'pages') ? $row['uid'] : $row['pid'];
// only add $GLOBALS['BE_USER'] != NULL &&
if ($GLOBALS['BE_USER'] != NULL && !$this->getBackendUser()->isInWebMount($pageUid)) {
// Current record is not within web mount => skip it
continue;
}
The Problem exist in older Versions, too:
https://forum.typo3.org/index.php/t/204838/
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.