Bug #23270
closedforceTypeValue does not work
Added by Thomas Deinhamer over 14 years ago. Updated about 6 years ago.
100%
Description
The config parameter forceTypeValue seems not to work anymore.
There is a page object defined with type 100, and is set to forceTypeValue = 0, but the links generated from within the content elements are just created with type=100 and not type=0.
We have tried to change various and obvious configuration settings, but it's always the same.
Can somebody else reproduce this behaviour?
Thanks a lot!
I haven't yet tested if this just related to the custom configuration of the project, where this behaviour occurs.
(issue imported from #M15239)
Files
15239.diff (835 Bytes) 15239.diff | Administrator Admin, 2010-12-27 16:59 | ||
class.tslib_menu.php.patch (595 Bytes) class.tslib_menu.php.patch | typo3/sysext/cms/tslib/class.tslib_menu.php | Steffen Roßkamp, 2013-04-10 15:16 | |
AbstractMenuContentObject.php.patch (660 Bytes) AbstractMenuContentObject.php.patch | typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php | Steffen Roßkamp, 2013-04-10 15:16 |
Updated by Mathias Schreiber over 14 years ago
Unable to reproduce on trunk.
config {
language = de
locale_all = de_DE@euro
doctype = xhtml_trans
xmlprologue = none
xhtml_cleaning = all
}
temp.menu = COA
temp.menu {
10 = HMENU
10.entryLevel = 0
10.1 = TMENU
10.1.NO.linkWrap = |<br />
10.1.forceTypeValue = 12
}
page = PAGE
page.typeNum = 10
page.20 < temp.menu
Works as expected, I suspect user error.
If reproducable, please attach sample TS
Updated by Thomas Deinhamer almost 14 years ago
If using the following TypoScript, the links generated do use ?type=100 and NOT ?type=0:
typepage = PAGE
typepage {
typeNum = 100
config {
forceTypeValue = 0
}
}
Imo when set forceTypeNum = 0 then the type parameter should not be prepended to links at all. In this case it's totally ignored and the generated links just use ?type=100 which is imo totally wrong.
Note: Happens with and without RealUrl enabled.
Updated by Jo Hasenau almost 14 years ago
In class.t3lib_tstemplate.php there is the following check at line 1461 (current trunk)
if (t3lib_div::testInt($typeOverride) && intval($GLOBALS['TSFE']->config['config']['forceTypeValue'])) {
$typeOverride = intval($GLOBALS['TSFE']->config['config']['forceTypeValue']);
}
So I guess this won't work with a Zero value, since this will behave just like FALSE.
Maybe changing the check to isset() instead of intval() while keeping intval() for $typeOverride could help here.
Updated by Jo Hasenau almost 14 years ago
Same for class.tslib_menu.php - but in this case the check is done against $typeOverride, which will return false if the type is Zero.
Another check could be this one:
if(($typeOverride || $typeOverride===0) && whatever)
Could be working for class.t3lib_tstemplate.php as well.
Updated by Jo Hasenau almost 14 years ago
please check, if the attached patch solves the problem
Updated by Dmitry Dulepov over 13 years ago
- Category deleted (
Communication) - Status changed from Needs Feedback to Closed
- Target version deleted (
0)
No feedback provided within 90 days. Closing the issue.
Updated by Steffen Roßkamp over 11 years ago
- File class.tslib_menu.php.patch class.tslib_menu.php.patch added
- File AbstractMenuContentObject.php.patch AbstractMenuContentObject.php.patch added
This issue still exists.
Added patches.
Updated by Gerrit Code Review over 11 years ago
- Status changed from Closed to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19778
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19778
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at https://review.typo3.org/20067
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/20068
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20185
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/20068
Updated by Gerrit Code Review over 11 years ago
Patch set 3 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/20068
Updated by Gerrit Code Review over 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19778
Updated by Gerrit Code Review almost 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/19778
Updated by Gerrit Code Review almost 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/19778
Updated by Gerrit Code Review almost 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/19778
Updated by Gerrit Code Review over 9 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/19778
Updated by Gerrit Code Review over 9 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/19778
Updated by Gerrit Code Review over 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40504
Updated by Steffen Roßkamp over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d538d79e7b236f8ee1de3a36d2e0d590771dd540.