Project

General

Profile

Actions

Bug #78211

closed

AbstractTreeView: Call to a member function isInWebMount() throwed FATAL

Added by Dave Najeel about 8 years ago. Updated about 8 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2016-10-09
Due date:
% Done:

50%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
AbstractTreeView
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

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/


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #79013: Using PageTreeView without logged in BE_USER throws errorRejected2016-12-16

Actions
Actions

Also available in: Atom PDF