[TYPO3-english] Conditioanl constants in setup conditions

Stephan Schuler Stephan.Schuler at netlogix.de
Wed Nov 13 17:02:40 CET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Bernd.


Of course you're right, I did miss the "globalVar" when adjusting my real world use case to the email example, and I did another mistake when quoting.

My real world use case (which I just stripped down in order to make the email not that complicated) is in fact the following "setup" part:
> [globalString = LIT:{$config.language} = /^{$config.validLanguages}$/]

So, be assured that my real world example does work in terms of correct TypoScript and expected values.
As you may have noticed, I didn't ask for help about "how does it work, doesn't do what I want", I just told you that there is a performance issue with that. I even explained why.
The problem is not the format I do use TypoScript, the problem is cache mismatches based on plain string compare operations.


Kind regards,


Stephan Schuler
Web-Entwickler

Telefon: +49 (911) 539909 - 0
E-Mail: Stephan.Schuler at netlogix.de
Website: media.netlogix.de



- --
netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Neuwieder Straße 10 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: info at netlogix.de | Internet: http://www.netlogix.de

netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt



- -----Ursprüngliche Nachricht-----
Von: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-bounces at lists.typo3.org] Im Auftrag von bernd wilke
Gesendet: Mittwoch, 13. November 2013 16:36
An: typo3-english at lists.typo3.org
Betreff: Re: [TYPO3-english] Conditioanl constants in setup conditions

Am 13.11.13 15:47, schrieb Stephan Schuler:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Hey there.
>
>
> I just discovered something that costs me some CPU cycles. It’s related to having conditions in both, constants and setup that are tied closely.
>
>
> Let me show a short example:
>
>> Constants:
>>>    [globalVar = GP:L = 0]
>>>       config.language = en
>>>    [globalVar = GP:L = 1]
>>>       config.language = de
>>>    [GLOBAL]
>>>
>> Setup:
>>>    [LIT:{$config.language} = de|en$/]
>>>       // Something that only is available for a configured set of languages, e.g. enabled solr cores.
>>>    [GLOBAL]
>
>
> I think my use case is valid. See the TypoScript reference, pretty much at the end of "globalVar" examples.
> http://docs.typo3.org/typo3cms/TyposcriptReference/Conditions/Referenc
> e/Index.html#condition-globalvar
>
> There it says:
>> If the constant {$constant_to_turnSomethingOn} is "1" then this matches:
>>> [globalVar = LIT:1 = {$constant_to_turnSomethingOn}]

and why don't you use it like in the manual written?

there is a 'globalVar = ' in front of the LIT unlike your usage and I don't know wether the '$/' at the end of your condition really is intented as you will not get a match  with this either

> The problem is rather complex, so I'm not going to explain what happened in detail. I will do that in a forge ticket if somebody else agrees to this being a bug.

PIBKAC ?


bernd
- --
http://www.pi-phi.de/cheatsheet.html
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 3.3.0 (Build 9307)
Charset: utf-8

wpUDBQFSg6Khpp0IwsibV8MBCNr/BAC8kC+VTvXYXny7gFM2fEX180Y9t+c1H+xt
6k101tc2n96HTRyKJQPrp5b//DuWQp0Gu35rk0Zn/9Q2qxiyokdRMssBwH+FyzAa
8gufDn9W4jhae50MkSyseN3Ig588CS/O8sK0HjVD4vV/ag2UgikHMXABU9ncGCfn
8a518iA5/A==
=YWZy
-----END PGP SIGNATURE-----


More information about the TYPO3-english mailing list