Project

General

Profile

Actions

Bug #23270

closed

forceTypeValue does not work

Added by Thomas Deinhamer over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-07-26
Due date:
% Done:

100%

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

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
Actions #1

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

Actions #2

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.

Actions #3

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.

Actions #4

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.

Actions #5

Updated by Jo Hasenau almost 14 years ago

please check, if the attached patch solves the problem

Actions #6

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.

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

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

Actions #12

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

Actions #13

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

Actions #14

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

Actions #15

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

Actions #16

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

Actions #17

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

Actions #18

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

Actions #19

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

Actions #20

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

Actions #21

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

Actions #22

Updated by Steffen Roßkamp over 9 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF