typosscript from 7.6 not compatilbe with typoscript 12.4.7 - not inserting the content

65 views Asked by At

I tried to move to Typo3 12.4.7 and have problems in converting the typoscript, which works fine under ver 7.6.X

The Screen not_working_screen could be obtained, when I change the following lines in the ver 7.6.X script:

    # for version 7.X there was: page.1 = TEMPLATE
    page.1 = FLUIDTEMPLATE
    page.1 {
       # the follwing 4 lines are for ver 12.X
       templateName = index
       templateRootPaths {
             1 = fileadmin/templates/webteam
        }
    

The Problem is, the screen with the menus does not fill the contents with the variables. I have defined the setup.typoscript here in the Typo3 : Dashboard

I am novice to Typoscript completly, so where could I debug and search for the reason.

Here is my setup.typoscript script.

    page = PAGE
    page.typeNum = 0
    page.meta.DESCRIPTION = My Site
    page.meta.KEYWORDS = Internet, Homepage, Typo3
    #page.shortcutIcon = fileadmin/templates/webteam/images/favicon.ico
    page.includeCSS { 
       file1 = fileadmin/templates/webteam/css/cms.css
       file2 = fileadmin/templates/webteam/css/base.css
       file3 = fileadmin/templates/webteam/css/mug_base.css
       file4 = fileadmin/templates/webteam/css/cockpit.css
       file5 = fileadmin/templates/webteam/css/menu.css
    }
    
    page.bodyTag = <body>
    # for versioon 7.X page.1 = TEMPLATE
    page.1 = FLUIDTEMPLATE
    page.1 {
       # the follwing 4 lines are vor ver 12.X
       templateName = index
       templateRootPaths {
             1 = fileadmin/templates/webteam
        }
    
       template = FILE
       template.file = {$htmltpl}
       workOnSubpart = DOKUMENT
       subparts.KONTAKT = IMAGE 
       subparts.KONTAKT.file = {$KONTAKTLINK_BILDDATEI}
       subparts.KONTAKT.altText = {$KONTAKTLINK_ALT}
       subparts.KONTAKT.wrap = <a href="{$KONTAKTLINK}">|&nbsp;Kontakt</a>
       subparts.MENU < temp.Menu
       subparts.SUBMENU < temp.Submenu
       subparts.FOOTERMENU = COA
       subparts.FOOTERMENU{
        10 < temp.Footermenu
        15 = TEXT
        15.value = &nbsp; |
        20 < menus.language
       }   
       subparts.INHALT < styles.content.get
       subparts.INHALT_LINKS < styles.content.getLeft
       #subparts.INHALT_LINKS.select.pidInList = 2
       subparts.COPYRIGHT < temp.copyright
       subparts.TITEL = TEXT
       subparts.TITEL.field = title
       subparts.UNTERTITEL = TEXT
       subparts.UNTERTITEL.field = subtitle
       subparts.SITETITLE = TEXT
       subparts.SITETITLE < temp.siteTitel
       subparts.BESCHREIBUNG = TEXT
       subparts.BESCHREIBUNG < temp.beschreibung
       subparts.SUCHE = TEXT
       subparts.SUCHE.wrap = <form action="index.php?id={$SUCHID}" method="post" name="tx_indexedsearch">
       subparts.BANNER_LINKS = IMAGE 
       subparts.BANNER_LINKS.file = {$BANNER_BILDDATEI}
       subparts.BANNER_LINKS.altText = {$BANNER_ALT}
       subparts.BANNER_LINKS.wrap = <a href="{$BANNER_VERWEIS}">|</a>
       #subparts.LASTUPDATE < temp.lu
    }
    
    ## Language ########################################################################################
    config {
        # only append the language value if not the default language
        linkVars = L(1)
        # prevent creation of double linkVars www.page.com/index.php?id=12&L=1&L=1 
        # is just a cosmetical fix
        uniqueLinkVars = 1
        sys_language_overlay = hideNonTranslated
        sys_language_mode = content_fallback
    }
    
    # default language (german)
    config {
        language = de
        sys_language_uid = 0
        htmlTag_langKey = de
        locale_all = de_AT.UTF-8
    }
    plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0
    plugin.tx_pagenotfoundhandler.operator = ODER
    
    # override some language states if english is selected
    # Here comes an error 
    # Thu, 26 Oct 2023 13:16:16 +0000 [ERROR] request="1c1e84830dc3c" component="TYPO3.CMS.Core.TypoScript.IncludeTree.Visitor.IncludeTreeConditionMatcherVisitor": Expression could not be parsed. - {"expression":"globalVar = GP:L = 1"}
    #
    [globalVar = GP:L = 1]
        config {
            language = en
            sys_language_uid = 1
            htmlTag_langKey = en
            locale_all = en_US.UTF-8
        }
        plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 1
        plugin.tx_pagenotfoundhandler.operator = OR
    [global]
    
    
    ## END Language #####################################################################################
    

My menu.typoscript looks like this:

    temp.Menu = HMENU
    temp.Menu {
    
      1 = TMENU
      1 {
        wrap = <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>|</tr></table>
        noBlur = 1
        NO = 1
        NO {
          wrapItemAndSub = <td class="menu1" align="center">|</td>
          ATagParams = class=""
          ATagTitle.field = description // title
        }
    
        ACT = 1
        ACT {
          wrapItemAndSub = <td class="menu1" align="center">|</td>
          ATagParams = class="menuActive1"
          ATagTitle.field = description // title
        }
      }
    }
    
    temp.Submenu = HMENU
    temp.Submenu {
      entryLevel = 1
    
      1 = TMENU
      1 {
        expAll = 1
        noBlur = 1
        NO = 1
        NO {
          wrapItemAndSub = <div class="menu2">|</div>
          ATagParams = class="menu2"
          ATagTitle.field = description // title
        }
    
        ACT = 1
        ACT {
          wrapItemAndSub = <div class="teasedMenu">|</div>
          ATagParams = class="teasedMenuLink"
          ATagTitle.field = description // title
        }
    
        ACTIFSUB = 1    
        ACTIFSUB {
          wrapItemAndSub = <div class="teasedMenu">|</div>
          ATagParams = class="teasedMenuLink"
          ATagTitle.field = description // title
        }
            
        }
    
        2 < .1
        2 = TMENU
        2 {
            expAll = 1
            wrap = <div class="menu3">|</div>
            noBlur = 1
            NO = 1
            NO {
            wrapItemAndSub = <div>|</div>
            ATagParams = class="level2"
            ATagTitle.field = description // title
            }
        }
    }
    
    temp.Footermenu = HMENU
    temp.Footermenu {
      special = directory
      special.value = 192
    
      1 = TMENU
      1 {
        noBlur = 1
        NO = 1
        NO {
          wrapItemAndSub = |*| | &nbsp;&#124;&nbsp; |*| |
          ATagParams = class="menuSpecial1"
          ATagTitle.field = description // title
        }
      }
    }
    
    
    ## Language Menu ###################################################################################
    # Language switch with TEXT [de] [en]
    # set menus.language.1.NO.stdWrap.override = yourGerman || yourEnglish
    # set menus.language.1.ACT.stdWrap.override = yourGerman || yourEnglish
    # MODIFY IF YOU NEED MORE LANGUAGES
    # menus.language.special.value = 0,1
    # menus.language.1.NO.stdWrap.typolink.ATagParams = class="german" || class="english"
    # menus.language.1.NO.stdWrap.typolink.additionalParams = &L=0 || &L=1
    # menus.language.1.ACT.stdWrap.wrap = <span class="active german">|</span> || <span class="active english">|</span>
    menus.language = HMENU
    menus.language {
        wrap = <div id="language">|</div>
        special = language
        special.value = 0,1
        special.normalWhenNoLanguage = 0
        1 = TMENU
        1 {
            noBlur = 1
            # Standard Sprachen
            NO = 1
            NO {
                # default title would be the pagetitle need to be override with the language labels
                stdWrap.override = <span>[deutsch]</span> || <span>[english]</span>
                # remove default link as there would be no GET params
                doNotLinkIt = 1
                # create new link with current GET params
                stdWrap.typolink { 
                    parameter.data = page:uid
                    additionalParams = &L=0 || &L=1
                    addQueryString = 1
                    addQueryString.exclude = L,id,cHash,no_cache
                    addQueryString.method = GET
                    no_cache = 0
                    ATagParams = class="german" || class="english"
                }
            }
            ACT < .NO
            ACT = 1
            ACT {
                stdWrap.typolink > 
                stdWrap.wrap = <span class="active german">|</span> || <span class="active english">|</span>
            }
        }
    }
    
1

There are 1 answers

3
Bernd Wilke πφ On BEST ANSWER

TEMPLATE is a completely other object than FLUIDTEMPLATE.
therefore you can't just change the objectname and expect to have the same results.

TEMPLATE handles marker-templates where replacements is done to markers or subparts marked with markers. typical form: ###MYMARKER###

FLUIDTEMPLATES are FLUID-templates (hence the name) where replacement is done with variables which are noted like {myVariable} and sections (something like functions or subtemplates)

Therefore you need some more work to update a version 7 instance to version 12.
Anyway you will need some intermediate steps as there are not much options to auto-update data structures and configuration from version 7 to version 12. At least your steps should not go farer than 2 versions.
That also belongs to included extensions, which have individual update pathes.