[Typo3] Strange variable link behaviour after switching to SimulateStaticDocuments

Alexander Heidl aheidl at fulcio.co.uk
Mon Oct 3 15:22:50 CEST 2005


Guys, this issue drives me nuts and I don't seem to find an answer on that.
On various sites on my t3 installation I am using a language flag menu, just
out of the box and tweaked a little wherever needed. Using the default
index.php URL the menu adds the variable L to the string. And when I switch
the language again it adds another L to the string:

Default (German) UID = 0, English UID = 5

>From http://www.sancodental.com I choose English URL reads:

http://www.sancodental.com/index.php?id=xxx&L=5 and the site is all in
English. When I switch back to German the URL reads:

http://www.sancodental.com/index.php?id=xxx&L=5&L=0 and the site is in
german again. All fine with me, even the fact the variable is added twice.

But, I have just tested the simulateStaticDocuments the strange thing is
that in case the language variable is added twice, they are swapped. As the
result I cannot switch back the language after I have chosen one in the
first place.

Instead of index.php?id=xxxL=5&L=0 it would now read
home.xxx.0.html?&L=0&L=5 and switched back to the other language it would
read the same. My assumption is that while simulating static documents the
variable for the language uid is added to the url before the carried
variables are added; hence its corrupting the variable stack.

Has anypody had the same effect or a solution to that?

BR,

Alex Heidl

Here are my code snippets:

Main template:

config {
  #typolinkCheckRootline = 1
  simulateStaticDocuments = 1
  simulateStaticDocuments_addTitle = 100
  simulateStaticDocuments_pEnc = md5
  simulatestaticDocuments_noTypeIfNoTitle = 1
}

Language template (included with main):

# Default language, sys_language_uid = 0
config.sys_language_uid = 0
config.language = de_DE

# Setting up the language variable "L" to be passed along with links
config.linkVars = L

[language = en,en-gb,en-us,en-au,en-ca,en-nz,en-ie,en-za,en-jm,en-bz,en-tt]
config.sys_language_uid = 5
config.language = en
[END]

# German language, sys_language_uid = 0
[globalVar = GP:L = 0]
config.sys_language_uid = 0
config.language = de
[GLOBAL]

# English language, sys_language_uid = 5
[globalVar = GP:L = 5]
config.sys_language_uid = 5
config.language = en
[GLOBAL]

# Spanish language, sys_language_uid = 8
[globalVar = GP:L = 8]
config.sys_language_uid = 8
config.language = es
[GLOBAL]

# Swedish language, sys_language_uid = 17
[globalVar = GP:L = 17]
config.sys_language_uid = 17
config.language = sv
[GLOBAL]

# Danish language, sys_language_uid = 16
[globalVar = GP:L = 16]
config.sys_language_uid = 16
config.language = da
[GLOBAL]

temp.language = COA
temp.language {
  10 = IMAGE
  10.file = GIFBUILDER
  10.file {
    XY = 21,30
    backColor = white
    10 = IMAGE
    10.file = {$pathToPics}sd_icon_speechbubble.gif
    10.offset = 0,10
    20 = ADJUST
    20.value = outputLevels = 200,255
  }

  20 = HMENU
  20.special = language
  20.special.value = 0,5
  20.1 = GMENU
  20.1 {
    NO {
      XY = [5.w]+4, [5.h]+6
      backColor = #ffffff
      wrap = |<br>
      5 = IMAGE
      5.file = {$pathToPublicMediapool}flags/hl_de.gif ||
{$pathToPublicMediapool}flags/hl_uk.gif
      5.offset = 2,0
      5.wrap = |<br>
    }

    ACT < .NO
    ACT {
      backColor = #ffffff
    }
    ACT = 1

    USERDEF1 < .NO
    USERDEF1 {
      noLink = 1
      5.file = {$pathToPublicMediapool}flags/hl_de_g.gif ||
{$pathToPublicMediapool}flags/hl_uk_g.gif
    }
    USERDEF1 = 1
  }
}





More information about the TYPO3-english mailing list