Issue Feature Closed

#73660Temporary mount point not shown in database browser

Michael Oehlhof 02/24/16, 23:24 updated 02/27/18, 10:03

Description

If a temporary mount point is set in the page tree, it is not shown in the database browser.

Setting a temporary mount point is done by this function in ExtdirectTreeCommands.php:

    public static function setTemporaryMountPoint($nodeData)
    {
        /** @var $node \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
        $node = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode::class, (array)$nodeData);
        $GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint'] = $node->getId();
        $GLOBALS['BE_USER']->writeUC($GLOBALS['BE_USER']->uc);
        return Commands::getMountPointPath();
    }

Checking for a mount point in the database browser is done in DatabaseBrowser.php with:

    protected function getTemporaryTreeMountCancelNotice()
    {
        if ((int)$this->getBackendUser()->getSessionData('pageTree_temporaryMountPoint') === 0) {
            return '';
        }
        $link = '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('setTempDBmount' => 0))) . '">'
            . $this->getLanguageService()->sl('LLL:EXT:lang/locallang_core.xlf:labels.temporaryDBmount', true) . '</a>';

        return GeneralUtility::makeInstance(FlashMessage::class, $link, '', FlashMessage::INFO)->render();
    }

It is set with writeUC and reading with getSessionData.
It looks like that the call of setAndSaveSessionData is missing.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.