[TYPO3-core] sysext FLUID might generate problems
Thomas Hucke
thucke at web.de
Tue Oct 8 21:47:10 CEST 2013
Hi team,
I stumbled upon an issue (in TYPO3 6.0.x) when the static template 'fluid:
(optional) default ajax configuration (fluid)' is loaded´.
The typoscript puts its entries near the end of the header section:
page.headerData.998 = TEXT
page.headerData.998.value {
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<link rel="stylesheet"
href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"
type="text/css" media="all" />
<link rel="stylesheet"
href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css"
type="text/css" media="all" />
}
I make use of jQuery in my extension and I have to load two additional JS in
the order after jQuery.
If you need to make use of the initialization function
$(document).ready
in your own script this has to be loaded after jQuery to define the
namespace for '$' or 'jQuery' before you use it.
The shot time solution would be to remove the static template.
Otherwise it could be very helpful to have only one default configuration to
activate jQuery in a site.
Other extension could rely on that and build their functions on it.
Actually the current implementation could not be used for that yet.
Am I wrong here with my statement?
Does one have a solution using the default template?
Ah - one additional information. My extension currently includes jQuery the
following way:
page {
includeJS {
jquery = //ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js
jquery.compressed = 1
jquery.external = 1
jquery.forceOnTop = 0
jQueryFormPlugin = EXT:th_rating/Resources/Public/Js/jquery.form.js
actions = EXT:th_rating/Resources/Public/Js/actions.js
}
....
Yeah, you can put that code on position 999 of the page. But - to be
honest - that would not a very good way I think.
Thank you
Thomas
More information about the TYPO3-team-core
mailing list