Project

General

Profile

Actions

Bug #17278

closed

Override values for preview in admpanel TSconfig not always respected

Added by Lucas Thurston almost 17 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-05-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Take a look here:

admPanel = 1
admPanel {
enable.edit = 1
override.edit.displayFieldIcons = 1
enable.preview = 1
preview = 1
override {
preview = 1
preview {
showHiddenPages = 1
showHiddenRecords = 1
simulateUserGroup = 0
}
}
hide = 1
}

The specific issue that was occurring with this TSconfig setup was that I didn't want to simulate a usergroup when logged into the backend, because this makes TYPO3 behave like a user is logged in. Setting simulateUserGroup to 0 didn't help. Looking at class.t3lib_tsfebeuserauth.php I found out why:

801: // override all settings with user TSconfig
802: if ($this->extAdminConfig['override.'][$pre.'.'][$val] && $val) {
803: return $this->extAdminConfig['override.'][$pre.'.'][$val];
804: }

The first half of this if is checking if the value a given property (such as simulateUserGroup) is set to evaluates to TRUE. Since I've set the value to 0, the if evaluates to false, and a couple lines down, the function returns TRUE because "preview" is set to 1. Any override properties within "preview" will always evaluate to TRUE if preview is set to 1 as far as I can tell. This may happen in other override properties as well, I haven't looked into it to fully.

The change I made looks like this:

802: if (isset($this->extAdminConfig['override.'][$pre.'.'][$val]) && $val) {

Yay! Now a 0 value can be returned if that's what the property value is set to.

Diff attached. Hope this helps!

(issue imported from #M5566)


Files

t3lib_tsfebeuserauth_patch.diff (391 Bytes) t3lib_tsfebeuserauth_patch.diff Administrator Admin, 2007-05-04 20:56

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #16825: AdminPanel Preview does not work correctly: selecting one option selects allClosed2007-01-02

Actions
Actions #1

Updated by Lucas Thurston almost 17 years ago

Related to bug #16825.

Actions #2

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #3

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions

Also available in: Atom PDF