Project

General

Profile

Actions

Bug #35371

closed

JMENU headerdata are written without <script>-Tag with UserInt on page

Added by Franz Kugelmann almost 12 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Caching
Target version:
Start date:
2012-03-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In current 4.6.x there is an issue with JMENU:
If you have a JMENU on a page and also an USER_INT element in there, then the JavaScript-Code written to headerData is displayed on the webpage, because the surrounding <script>-Tag is missing.
This happens only if the page is loaded from cache.
In tslib_fe::INTincScript the marker for headerData is replaced with $this->additionalHeaderData, but in there the surrounding <script>-tag is missing.
A working (but very dirty) hotfix is attached (mainly for better understanding the issue), works for me currently but there must be a better way. I will dig deeper as soon as time is available.


Files

class.tslib_fe.php.diff (967 Bytes) class.tslib_fe.php.diff Franz Kugelmann, 2012-03-29 16:29
class.tslib_fe.php.diff (626 Bytes) class.tslib_fe.php.diff Franz Kugelmann, 2012-04-01 12:09

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #22273: PageRenderer does not work for USER_INT pluginsClosed2011-08-25

Actions
Actions #1

Updated by Franz Kugelmann almost 12 years ago

attached is a better patch, still not sure if valid for all situations.
Please give feedback, if you have the same behaviour like described in this issue and if the patch fixes it.

Depending on the feedback, i will send a review patch to gerrit.

Actions #2

Updated by Helmut Hummel almost 12 years ago

Franz, thanks for looking into that issue.

I think the main reason for that bug is, that some code has been removed due to deprecation in prior versions but not all occurrences were tackled.

See #27983 and #29041 for further details.

If you have time to dig into it, it would be great to have a consistent and bug free state.

Actions #3

Updated by Mathias Schreiber about 9 years ago

  • Target version changed from 4.6.8 to 7.2 (Frontend)
  • Is Regression set to No
Actions #4

Updated by Riccardo De Contardi almost 9 years ago

  • Status changed from New to Closed

Seems not present in 6.2.12: this is my test (fresh installation):

1) Typoscript Setup:

config.disablePrefixComment=1
page = PAGE

page.5 = HMENU
page.5.1 = JSMENU
page.5.1 {
  levels = 1
  1.wrap = |<br>
}
page.10 < styles.content.get

Result: (only jsmenu object):
In the head section:

<script type="text/javascript" src="typo3/sysext/frontend/Resources/Public/JavaScript/jsfunc.menu.js"></script>

<script type="text/javascript">
    /*<![CDATA[*/
<!--
var JSmenub9af9 = new JSmenu(1, 'JSmenub9af9Form');
 var eidb9af91=0;
eidb9af91=JSmenub9af9.add(0,0,0,'level1','index.php?id=8','');
eidb9af91=JSmenub9af9.add(0,eidb9af91,0,'my\u0020page','index.php?id=2','');
eidb9af91=JSmenub9af9.add(0,eidb9af91,0,'my\u0020page\u00202','index.php?id=4','');

// -->
    /*]]>*/
</script>

In the body section:

<form action="" method="post" style="margin: 0 0 0 0;" name="JSmenub9af9Form">
    <select name="selector1" onchange="JSmenub9af9.act(1);">
        <option value="0">______________</option>
        <option value="0"></option>
        <option value="0"></option>
        <option value="0"></option>
        <option value="0"></option>
    </select><br>
</form>
<script type="text/javascript"> /*<![CDATA[*/ JSmenub9af9.writeOut(1,JSmenub9af9.openID,1); /*]]>*/ </script>

2) add the FELOGIN plugin in page colunm0;

result (I also cleared the cache):

head section:

<script type="text/javascript" src="typo3/sysext/frontend/Resources/Public/JavaScript/jsfunc.menu.js"></script>

<script type="text/javascript">
    /*<![CDATA[*/
<!--
var JSmenu96094 = new JSmenu(1, 'JSmenu96094Form');
 var eid960941=0;
eid960941=JSmenu96094.add(0,0,0,'level1','index.php?id=8','');
eid960941=JSmenu96094.add(0,eid960941,0,'my\u0020page','index.php?id=2','');
eid960941=JSmenu96094.add(0,eid960941,0,'my\u0020page\u00202','index.php?id=4','');

// -->
    /*]]>*/
</script>

<script type="text/javascript">var TYPO3FrontendLoginFormRsaEncryptionPublicKeyUrl = 'index.php?eID=FrontendLoginRsaPublicKey';</script>
<script type="text/javascript" src="http://typo3.62.basic.it:8888/typo3/sysext/rsaauth/resources/jsbn/jsbn.js"></script>
<script type="text/javascript" src="http://typo3.62.basic.it:8888/typo3/sysext/rsaauth/resources/jsbn/prng4.js"></script>
<script type="text/javascript" src="http://typo3.62.basic.it:8888/typo3/sysext/rsaauth/resources/jsbn/rng.js"></script>
<script type="text/javascript" src="http://typo3.62.basic.it:8888/typo3/sysext/rsaauth/resources/jsbn/rsa.js"></script>
<script type="text/javascript" src="http://typo3.62.basic.it:8888/typo3/sysext/rsaauth/resources/jsbn/base64.js"></script>
<script type="text/javascript" src="http://typo3.62.basic.it:8888/typo3/sysext/rsaauth/resources/FrontendLoginFormRsaEncryption.min.js"></script>

body section:

<form action="" method="post" style="margin: 0 0 0 0;" name="JSmenu96094Form">
    <select name="selector1" onchange="JSmenu96094.act(1);">
        <option value="0">______________</option>
        <option value="0"></option>
        <option value="0"></option>
        <option value="0"></option>
        <option value="0"></option>
    </select><br>
</form>
<script type="text/javascript"> /*<![CDATA[*/ JSmenu96094.writeOut(1,JSmenu96094.openID,1); /*]]>*/ </script>

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF