Project

General

Profile

Actions

Bug #76250

closed

Different TypoScript behavior between PHP5.6 and PHP7

Added by Philipp Serrer over 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2016-05-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I'm latetly trying to migrate a page to PHP7, but I have some problems with TypoScript.

After some investigation, it seems the error occured because of the reference operator:

tt_content.stdWrap.innerWrap.cObject {
        ...
    103 =< tt_content.stdWrap.innerWrap.cObject.default
    103.20.10.value = box-leading
        ...
}

After the first occurrence of an element with this frame section, every following element also get the class box-leading. If I change =< to a simple =, this part works.

This problem also exists using fluid and cObject.

Interesstingly the page renders correctly if I reload the page with ctrl+f5 hotkey.

Actions #1

Updated by Elmar Hinz over 8 years ago

The page should be answered the TYPO3 cache even on forced reload. If it changes, either the cache is turned off or an USER_INT or COA_INT is involved.

As both is not the standard case, I ask for a a little more detailed description of the TS setup.

Actions #2

Updated by Philipp Serrer over 8 years ago

Elmar Hinz wrote:

The page should be answered the TYPO3 cache even on forced reload. If it changes, either the cache is turned off or an USER_INT or COA_INT is involved.

The TypoScriptFrontendController differs between normal requests and "shift reload" request (headerNoCache()-method) and applies other logic.

As said before, if I clear all caches (i.e. with coreapi extension and command line cacheapi:clearallcaches) and reload the page, I got the wrong result. If i reload the page normal, it stays the same. The "shift reload" returns the correct result and every following request also returns the correct result. (cache enabled with config.no_cache=0)

If I do the same with cache turned off (config.no_cache=1), the first time I open the page, I get the wrong result. The second, thrid,.. time I get the correct result. This time it doesn't matter how I reload the page.

Seems to me like the first time Typo3 uses some wrong values, write them to an cache. The next time Typo3 load the values from the cache and they are applied correctly. I could be wrong, but currently I have no other explanation.

As both is not the standard case, I ask for a a little more detailed description of the TS setup.

I run a normal Typo3 setup with no exotic extensions. Here's an extract of our ts setup. Some (for me) unimportant parts are stripped:

config {
    linkVars = L(0-9)
    sys_language_uid = {$lib.sys_language_uid}
    metaCharset = utf-8
    locale_all = {$lib.locale_all}
    language = {$lib.typo3LanguageCode}
    message_page_is_being_generated = Page ###REQUEST_URI### is being generated. If this message does not disappear within 10 seconds, please reload.
    sys_language_mode = ignore
    sys_language_overlay = 0
}

[globalVar = LIT:0 < {$lib.content_fallback}]
config {
    sys_language_mode = content_fallback; {$lib.content_fallback},0
    sys_language_overlay = hideNonTranslated
}
[global]

config {
    # Doctype
    doctype = html5
    xmlprologue = none
    htmlTag_langKey < config.language

    # Code Cleaning
    disablePrefixComment = 1
     pageTitleFirst = 1
     removeDefaultJS = external
}

[globalVar = LIT:1 = {$lib.realurl.enable}]
config {
    simulateStaticDocuments = 0
    baseURL = {$lib.url.protocol}://{$lib.url.domain}{$lib.url.basePath}
    tx_realurl_enable = 1
    prefixLocalAnchors = all
}
[global]

config {
    no_cache = {$lib.config.disableCache}
    cache_period = 604800
    sendCacheHeaders = 0
    meaningfulTempFilePrefix = 100
}

page = PAGE
page.10 = FLUIDTEMPLATE
page.10 {
    file = {$lib.path.html}/tpl_website.html
    partialRootPath = {$lib.path.html}/
    variables{
        layout = TEXT
        layout.data = levelfield:-1,backend_layout_next_level,slide
        layout.override.field = backend_layout
    }
}

# Body-Tag
page.bodyTagCObject = COA
page.bodyTagCObject {
    wrap = <body class=" | ">
    10 = TEXT
    10.data = levelfield:-1,backend_layout_next_level,slide
    10.override.field = backend_layout
    10.stdWrap.noTrimWrap = |layout-||
    20 = TEXT
    20.value = screen
    20.stdWrap.noTrimWrap = | type-||
    30 = TEXT
    30.value =
    30.stdWrap.noTrimWrap = | ||
    40 = TEXT
    40.field = uid
    40.stdWrap.noTrimWrap = | pid-||
    50 = TEXT
    50.value = {$lib.language}
    50.stdWrap.noTrimWrap = | language-||
}
# Body-Tag für Popups
[globalVar = GP:popup = 1]
page.bodyTagCObject.20.value = popup
[global]

page {
    shortcutIcon = {$lib.path.favicon}/{$lib.meta.favicon}
    meta >
    meta.content-type = text/html; charset=utf-8
    meta.content-type.httpEquivalent = 1
    headerData.20 = COA
    headerData.20 {
        # ...
    }
}

Actions #3

Updated by Riccardo De Contardi about 8 years ago

  • Category set to TypoScript
Actions #4

Updated by Benni Mack almost 6 years ago

  • Status changed from New to Needs Feedback

Hey Philipp,

we've made several improvements to PHP7 compatibility (now even with PHP 7.3) - can you confirm that your issue still exists with the "<" operator?

Actions #5

Updated by Riccardo De Contardi over 5 years ago

  • Status changed from Needs Feedback to Closed

No feedback since the last 90 days => closing this issue.

If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or ping me.

Thank you and best regards

Actions

Also available in: Atom PDF