Feature #23494

config.additionalHeaders - add stdWrap

Added by Rik Willems over 9 years ago. Updated about 1 year ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2014-02-25
Due date:
% Done:

0%

PHP Version:
4.3
Tags:
Complexity:
hard
Sprint Focus:

Description

This patch adds stdWrap to config.additionalHeaders. This allows a more flexible setup.

A possible usage could be to use a typolink to create forwards under certain conditions...

Possible usage:

[PIDinRootline = XX] && [loginUser = *]
page >
page = PAGE
page.config.additionalHeaders = TEXT
page.config.additionalHeaders {
typolink.parameter = YY
typolink.returnLast = url
wrap = Location: {$config.baseURL}|
}
page.10 = TEXT
[end]
(issue imported from #M15626)


Related issues

Related to TYPO3 Core - Bug #86492: stdWrap on config.additionalHeaders is broken for (fully) cached pages. Closed 2018-10-01
Duplicated by TYPO3 Core - Feature #21417: TypoScript: page.config.additionalHeaders: Lack of flexibility because of data type string Closed 2009-11-01
Follows TYPO3 Core - Feature #56236: Allow multiple headers of the same type in config.additionalHeaders Closed 2014-02-24

Associated revisions

Revision 2124bba4 (diff)
Added by Philipp Gampe over 2 years ago

[FEATURE] Add stdWrap to config.additionalHeaders

Add stdWrap to the elements header, replace and httpResponseCode.

Resolves: #23494
Related: #56236
Releases: master
Change-Id: I3adbb63ec66097775c041a3a18299ad48f6df7aa
Reviewed-on: https://review.typo3.org/50142
Tested-by: TYPO3com <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>
Reviewed-by: Joerg Boesche <>
Reviewed-by: Sascha Rademacher <>
Reviewed-by: Henning Liebe <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

History

#1 Updated by Frederic Gaus over 9 years ago

This is a duplicate of #0012424. But #0012424 does not have a patch.

#2 Updated by Jo Hasenau over 9 years ago

The example shown above should not work even with stdWrap added to additionalHeaders, because the syntax would be wrong due to stdWrap not being a fully fledged $this->cObj->cObjGetSingle:

This should be enough to just get a typolink (without any linked text)

config.additionalHeaders {
typolink.parameter = YY
typolink.returnLast = url
wrap = Location: {$config.baseURL}|
}

and if you wanted the parameter to behave as a TEXT object, you should do it like that:

config.additionalHeaders.cObject = TEXT
config.additionalHeaders.cObject {
value = Something
typolink.parameter = YY
typolink.returnLast = url
wrap = Location: {$config.baseURL}|
}

no need to put any stdWrap in between (like additionalHeaders.stdWrap.blah), because it would be enough to just make the parameter stdWrap-aware itself.

same for page.config.additionalHeaders and of course same for any other parameter that will gain stdWrap functionality in 4.5

#3 Updated by Ernesto Baschny almost 9 years ago

But this hasn't happened unfortunately, sorry Rik. Postponing it to 4.6 then.

#4 Updated by Jo Hasenau almost 9 years ago

As far as I remember we decided not to touch the config parameters with stdWrap, since they are top level objects that don't belong to tslib_content directly.

Another reason was, that config parameters like baseURL are used by extensions that would not be able to handle stdWrap this way (i.e. realURL)

#5 Updated by Rik Willems almost 9 years ago

If I remember correctly it was undecided. Some people said not to use stdWrap in config others pointed out that it could be valuable.

Adding additionalHeaders as a property of the PAGE object. Would that be an idea?

#6 Updated by Ernesto Baschny almost 9 years ago

Yes, I think that wouldn't touch the "holy .config" and have an implementation in a place where you can be sure that a valid cObject is available (also loaded with the current's page $row in ->data).

Thanks Rik!

#7 Updated by Rik Willems almost 9 years ago

Ok cool. I'll look into this.

#8 Updated by Rik Willems almost 9 years ago

Ok, I dove into this a little. But, this deep I've never been. I noticed that the page is generated first, after which processOutput() in tslib_fe outputs header info.
Can you give a hint on where to implement this feature if I do it trough the PAGE object.

#9 Updated by Xavier Perseguers over 8 years ago

  • Category deleted (Communication)
  • Target version deleted (4.6.0-beta1)

#10 Updated by Florian Staudacher almost 8 years ago

Is there any new information on this?
I would really like to see this feature implemented, regardless wether in the CONFIG or PAGE object.

I can hardly bear that the only way to redirect a visitor dynamically with the allmighty TypoScript is by using meta.refresh ... :-(

#11 Updated by Sigfried Arnold over 7 years ago

I assume there is no news on this issue - i'm stuck with the same Problem, i want to redirect - but meta refresh is a litte clumsy solution

#12 Updated by Jochen Rieger about 7 years ago

In case there is no other option that is being overlooked here, I'd also strongly vote for stdWrap option here.

#13 Updated by Christian Ludwig over 5 years ago

I vote for this feature too because it would be very useful to redirect to a login page with adding the referrer when an user visits restricted pages without being logged in.

[PIDinRootline = 123,321] && [loginUser = ]
    page.config >
    page.config.additionalHeaders = TEXT
    page.config.additionalHeaders {
        data = getIndpEnv:TYPO3_REQUEST_URL
        wrap = {$config.baseURL}/login/?referer= |
    }
[end]

#14 Updated by Marc Fell about 5 years ago

May I vote for this feature, too? :o) +1

It's very senseful for dynamic shortcuts - in my case for QR-Codes on real-world products.

I would like to have something like this (not working, of course...):
page.config.additionalHeaders.dataWrap = Location: http://www.asdfghj.de/index.php?id={field:shortcut}&utm_source=Verpackungen&utm_medium=Mobile&utm_term=abc&utm_campaign=QR-Code |

-> for Google Analytics

#15 Updated by Morten Kjems about 5 years ago

Vote for this too.

Struggling with a basic login/redirect scheme and this would solve it.

#16 Updated by Teamgeist Medien about 5 years ago

Voting for this too

#17 Updated by Benni Mack almost 5 years ago

  • Assignee set to Benni Mack

let's get this feature in first, then we'll add stdWrap

https://review.typo3.org/#/c/27814/

#18 Updated by Thomas Löffler over 4 years ago

Feature was merged. Now let's add stdWrap! :)

#19 Updated by Bernhard Eckl over 4 years ago

+1 for stdWrap!

#20 Updated by Riccardo De Contardi about 4 years ago

  • Category set to TypoScript

#21 Updated by Riccardo De Contardi almost 4 years ago

  • Target version set to Candidate for Major Version

#22 Updated by Philipp Gampe about 3 years ago

On the way ...

config.additionalHeaders {
  10.header = foo:
  10.header.dataWrap = |{page:uid}
}

#23 Updated by Philipp Gampe about 3 years ago

  • Due date deleted (2014-02-25)
  • Status changed from New to In Progress
  • Assignee changed from Benni Mack to Philipp Gampe
  • Complexity set to easy

#24 Updated by Philipp Gampe about 3 years ago

  • File deleted (diff.txt)

#25 Updated by Gerrit Code Review about 3 years ago

  • Status changed from In Progress 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/50142

#26 Updated by Gerrit Code Review about 3 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/50142

#27 Updated by Gerrit Code Review about 3 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/50142

#28 Updated by Gerrit Code Review almost 3 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/50142

#29 Updated by Gerrit Code Review almost 3 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/50142

#30 Updated by Gerrit Code Review almost 3 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/50142

#31 Updated by Thomas Oliver Moll over 2 years ago

Hi,

Sorry, I'm not hugely familiar with this process.. if implemented, in which versions will it be? Only in 8.x or by any chance in 7.6?

#32 Updated by Philipp Gampe over 2 years ago

Hello Thomas,

It will not be in any of these versions, because it is not merged yet. Because it is a new feature, it can only be merge to master (see Releases line). That means, it will appear in a version of TYPO3 9.x (if merged at all).

If you want this feature to appear in future TYPO3 version, then please test the change and leave a review note on the review server.
https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/

#33 Updated by Gerrit Code Review over 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/50142

#34 Updated by Gerrit Code Review over 2 years ago

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

#35 Updated by Gerrit Code Review over 2 years ago

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

#36 Updated by Philipp Gampe over 2 years ago

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

#37 Updated by Markus Klein about 1 year ago

  • Related to Bug #86492: stdWrap on config.additionalHeaders is broken for (fully) cached pages. added

#38 Updated by Markus Klein about 1 year ago

  • Status changed from Resolved to Rejected
  • Assignee deleted (Philipp Gampe)
  • Target version deleted (Candidate for Major Version)
  • % Done changed from 100 to 0
  • Complexity changed from easy to hard

Due to #86492 this feature will be reverted. Furthermore, the feature request is rejected as it is not solvable currently.

#39 Updated by Bernhard Eckl about 1 year ago

If it is rejected it is not reverted, it just never will be done. So why closing it?

#40 Updated by Riccardo De Contardi about 1 year ago

Reverted with #86492 (https://review.typo3.org/58517) I guess. Am I wrong?

Also available in: Atom PDF