Bug #29254
closedBug #22273: PageRenderer does not work for USER_INT plugins
TSFE->additionalFooterData for USER_INT
Added by Heiko Kromm about 13 years ago. Updated about 6 years ago.
100%
Description
Hi,
I think there should be the possibility to generate additionalFooterData with USER_INT extensions.
At the moment it's only possible to add additional JS from USER_INT extensions to the header.
But with the new possibility to move JS files to footer there are often missing dependencies, when including JS-files from USER_INT extensions to header.
Regards
Heiko
Updated by Steffen Gebert about 13 years ago
I'd say you can't add JS resources in USER_INT at all, as they are rendered after the complete page (except some markers for the USER_INT contents) has been rendered.
So I tend to set this to "Rejected", as it's not consistent with the concept of USER_INTs.
Updated by Björn Pedersen about 13 years ago
If remember the code right, a userint actually can generate three markers in the output stream (function INTincScript()) :
1) one in the headerpart, where js- and css-files/code can be added <!--HD_'.$this->config['INTincScript_ext']['divKey'] + INTincScript_loadJSCode();
2) the marker in the body <!--TDS_'.$this->config['INTincScript_ext']['divKey']....
3) the main marker <!--INT_SCRIPT.
So a fourth marker would be possible. But non-cached javascript should only be usedfor dynamic data as well, the non-changing code can and should be included as normal cached content for performance reason. So wether a third marker really is necessary can be discussed.
Updated by Heiko Kromm about 13 years ago
I think without this marker, the possibility to move JS from header to footer (config.moveJsFromHeaderToFooter) does not make much sense.
In most cases there are JavaScript-frameworks used, like Prototype or jQuery. If the framework has moved to the footer the methods of the framework (like selectors) could not be used anymore in inline JS.
With an additional marker I can put all my JS-code at the bottom of the page, which is recommended JS usage.
Without the marker the only possibility is to keep all JS in header (which slows down page loading) or use something like the scriptmerger extension to clean up JS files and put them at the bottom.
Updated by Björn Pedersen about 13 years ago
Well, for normal cached javascript, there is no problem here. And I my opinion a user_int plugin should only it's changing daat assigned to some var as non-cached javascript. Then, the tiny amount of JS used should not hurt. If larger amounts of data are needed, eID+ json are better anyway. But I would not object a fourth marker if somebody creates a patch.
Updated by Oliver Hader over 12 years ago
I consider this as a bug, the TSFE->additionalFooterData has been introduced with 4.3 however only for the t3lib_pageRenderer - so we have something like that already.
The problem with USER_INTs is, that e.g. if jQuery was told to be loaded in the footer, you don't have any chance to make use of jQuery in a USER_INT script (e.g. for widgets or something like that). Thus, using the available additionalFooterData seems to be okay - however a lot of stuff is missing there:
$ git blame typo3/sysext/cms/tslib/class.tslib_pagegen.php | grep additionalFooterData 6bea4ac3 (Steffen Kamper 2009-09-06 21:32:48 +0000 1028) if ($GLOBALS['TSFE']->additionalFooterData) { 30c60eef (Benni Mack 2010-04-12 16:17:20 +0000 1029) $pageRenderer->addFooterData(implode(LF, $GLOBALS['TSFE']->additionalFooterData));
Updated by Oliver Hader over 12 years ago
- Status changed from New to Accepted
- Assignee set to Oliver Hader
Updated by Oliver Hader over 12 years ago
- Subject changed from additionalFooterData for USER_INT to TSFE->additionalFooterData for USER_INT
Updated by Gerrit Code Review over 12 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11859
Updated by Gerrit Code Review over 12 years ago
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/11860
Updated by Gerrit Code Review over 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11859
Updated by Gerrit Code Review over 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11859
Updated by Gerrit Code Review over 12 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11859
Updated by Gerrit Code Review over 12 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11859
Updated by Oliver Hader over 12 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f60ccfde602e00ea55bddc51f569b20c3181018f.
Updated by Gerrit Code Review over 12 years ago
- Status changed from Resolved to Under Review
Patch set 2 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/11860
Updated by Oliver Hader over 12 years ago
- Status changed from Under Review to Resolved
Applied in changeset e4a9d5c60880cc0d14767eed5139359a452e840e.
Updated by Gerrit Code Review over 12 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/12570
Updated by Gerrit Code Review over 12 years ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/12571
Updated by Oliver Hader over 12 years ago
- Status changed from Under Review to Resolved
Applied in changeset ca50ec03c95ac58c0c4cabdd9f5b0230dd4e7da5.
Updated by Gerrit Code Review over 12 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/13179
Updated by Gerrit Code Review over 12 years ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/13289
Updated by Alexander Opitz over 11 years ago
- Status changed from Under Review to Resolved
It seams this issue was resolved. The two gerrit code reviews are removed (maybe they had false issue number).