Bug #41593
closedPHP Fatal error: Call to undefined method stdClass::isAdminPanelVisible()
100%
Description
If no Backend session exists I get this PHP error:
PHP Fatal error: Call to undefined method stdClass::isAdminPanelVisible() in /var/www/.../typo3/sysext/cms/tslib/index_ts.php on line 578
Line 578 in Version 4.5.x
Line 506 in Version 4.6.x
Line 474 in Version 4.7.x
The affected code looks like this:
if (is_object($BE_USER) && $BE_USER->isAdminPanelVisible() && $TSFE->beUserLogin) { $TSFE->content = str_ireplace('</head>', $BE_USER->adminPanel->getAdminPanelHeaderData() . '</head>', $TSFE->content); $TSFE->content = str_ireplace('</body>', $BE_USER->displayAdminPanel() . '</body>', $TSFE->content); }
This is my patch after each TYPO3 Update:
if (is_object($BE_USER) && method_exists($BE_USER, 'isAdminPanelVisible')) { if($BE_USER->isAdminPanelVisible() && $TSFE->beUserLogin) { $TSFE->content = str_ireplace('</head>', $BE_USER->adminPanel->getAdminPanelHeaderData() . '</head>', $TSFE->content); $TSFE->content = str_ireplace('</body>', $BE_USER->displayAdminPanel() . '</body>', $TSFE->content); } }
Only one of my 80 installations on the same server is affected and I could not find the reason why only this installation is affected.
Files
Updated by Steffen Gebert about 12 years ago
- Category deleted (
Backend User Interface) - Status changed from New to Accepted
Hi Steffen,
thanks for the snippet.
Even if it's not easily reproducible, the change is pretty easy and safe. Could you please create a patch and push it to the Gerrit review system? See http://wiki.typo3.org/Contribution_Walkthrough_Tutorials
Thanks!
Steffen
Updated by Steffen Hastädt about 12 years ago
- File 41593.4.5.patch 41593.4.5.patch added
- File 41593.4.6.patch 41593.4.6.patch added
- File 41593.4.7.patch 41593.4.7.patch added
Hi Steffen,
here are the patches for version 4.5, 4.6 and 4.7.
Best regards
Steffen
Updated by Gerrit Code Review almost 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27446
Updated by Gerrit Code Review almost 11 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27455
Updated by Gerrit Code Review almost 11 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27463
Updated by Gerrit Code Review almost 11 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27463
Updated by Łukasz Jurys almost 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset cf94a271a38ede5defd478b203409c382a17ab57.