Project

General

Profile

Actions

Bug #68591

closed

admin_panel.css gets referenced in frontend even if admin Panel is completely disabled

Added by Elmar Putz over 9 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
Start date:
2015-07-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I just noticed, that the link to the stylesheet for the admin panel is always included if a be user session exists.

<link rel="stylesheet" type="text/css" href="http://MYDOMAIN.COM/typo3/sysext/t3skin/stylesheets/standalone/admin_panel.css" />

This should not be the case, if the admin panel is disabled via config.admPanel = 0.
I stumpled upon this issue because we are using font awesome icons in our template which were not rendered correctly. Inspecting the CSS rule chain, we noticed that the above CSS file altered the layout.

Actions #1

Updated by Gerrit Code Review over 9 years ago

  • Status changed from New 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 http://review.typo3.org/42058

Actions #2

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42058

Actions #3

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42058

Actions #4

Updated by Wouter Wolters over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Claus Due about 9 years ago

  • Status changed from Resolved to Accepted

Stylesheet file is still appended to output regardless of pageTSconfig settings. As OP states, it absolutely should not be in the HTML output when the panel is decidedly off. The related patch is still needed in order to avoid conflicts when a user does desire the admin panel - but it does not solve the issue described in this report (which I now also face).

Actions #6

Updated by Claus Due about 9 years ago

Hmm. It seems that:

admPanel.enable = 0
admPanel.enable.all = 0

In user pageTSconfig does the trick. I'm not sure if admPanel.enable = 0 is needed (it isn't respected, judging from the code) but in any case, it looks like the default value of the admPanel.enable.all has been altered from 0 to 1.

The method that makes this decision appears to be slightly illogical:

// typo3/sysext/backend/Classes/FrontendBackendUserAuthentication.php:89
                $this->extAdminConfig = $this->getTSConfigProp('admPanel');
                if (isset($this->extAdminConfig['enable.'])) {
                        foreach ($this->extAdminConfig['enable.'] as $value) {
                                if ($value) {
                                        $this->adminPanel = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\View\AdminPanelView::class);
                                        $this->extAdmEnabled = TRUE;
                                        break;
                                }
                        }
                }

In other words, anything at all enabled means the entire admin panel gets forcibly enabled with no way to disable i in bulk. Any option that can be enabled must be disabled or the panel and asset still shows.

Adding a check here if admPanel.enable is explicitly zero and avoiding entering the loop would fix the issue reported by OP.

Actions #7

Updated by Gerrit Code Review about 9 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/44726

Actions #8

Updated by Gerrit Code Review about 9 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/44726

Actions #9

Updated by Georg Ringer about 9 years ago

  • Status changed from Under Review to Resolved
Actions #10

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF