Bug #80385

INCLUDE_TYPOSCRIPT is using wrong ConditionMatcher when using condition option

Added by Andreas Allacher about 2 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2017-03-22
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The INCLUDE_TYPOSCRIPT option does always use the Backend ConditionMatcher.
However, in FE this should be the Frontend ConditionMatcher because otherwise the current page might not be detected correctly.
Furthermore, constants also won't be available etc.


Related issues

Related to TYPO3 Core - Bug #76236: INCLUDE_TYPOSCRIPT condition PIDinRootline does not work correcty Closed 2016-05-19

Associated revisions

Revision 35fe85f3 (diff)
Added by Andreas Allacher about 2 years ago

[BUGFIX] INCLUDE_TYPOSCRIPT condition use correct ConditionMatcher

In order to support all conditions correctly
whether one is in FE or BE the condition
has to be matched against the correct
ConditionMatcher instead of always
using the one for BE.

Releases: master, 8.7, 7.6
Resolves: #80385
Change-Id: Id5e216da40000b408f96822855d97799f254d0fb
Reviewed-on: https://review.typo3.org/52114
Tested-by: TYPO3com <>
Reviewed-by: Mona Muzaffar <>
Reviewed-by: Joerg Boesche <>
Reviewed-by: Frank Naegler <>
Tested-by: Frank Naegler <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Jan Helke <>
Tested-by: Jan Helke <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision 227483f8 (diff)
Added by Andreas Allacher about 2 years ago

[BUGFIX] INCLUDE_TYPOSCRIPT condition use correct ConditionMatcher

In order to support all conditions correctly
whether one is in FE or BE the condition
has to be matched against the correct
ConditionMatcher instead of always
using the one for BE.

Releases: master, 8.7, 7.6
Resolves: #80385
Change-Id: Id5e216da40000b408f96822855d97799f254d0fb
Reviewed-on: https://review.typo3.org/52760
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

Revision dbc5b072 (diff)
Added by Andreas Allacher about 2 years ago

[BUGFIX] INCLUDE_TYPOSCRIPT condition use correct ConditionMatcher

In order to support all conditions correctly
whether one is in FE or BE the condition
has to be matched against the correct
ConditionMatcher instead of always
using the one for BE.

Releases: master, 8.7, 7.6
Resolves: #80385
Change-Id: Id5e216da40000b408f96822855d97799f254d0fb
Reviewed-on: https://review.typo3.org/52761
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Reviewed-by: Jan Helke <>
Tested-by: Jan Helke <>

History

#1 Updated by Gerrit Code Review about 2 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 https://review.typo3.org/52114

#2 Updated by Gerrit Code Review about 2 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/52114

#3 Updated by Gerrit Code Review about 2 years ago

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

#4 Updated by Gerrit Code Review about 2 years ago

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

#5 Updated by Gerrit Code Review about 2 years ago

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

#6 Updated by Andreas Allacher about 2 years ago

To test the easiest way is probably to check for usergroup:
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:..." condition="[usergroup = 1]">

Currently it will always check the usergroup of the Backenduser instead of the frontend user or backend user depending on the request.

It will might actually result in a PHP notice as $GLOBALS['BE_USER'] might not available in frontend.

#7 Updated by Gerrit Code Review about 2 years ago

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

#8 Updated by Gerrit Code Review about 2 years ago

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

#9 Updated by Benni Mack about 2 years ago

  • Target version changed from 8 LTS to next-patchlevel

#10 Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52760

#11 Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52761

#12 Updated by Anonymous about 2 years ago

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

#13 Updated by Benni Mack 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF