- Posts: 3
Postings
You can freely browse the forum and post in the community forum.
However, you need a valid license to write posts for support (own a valid commercial software license or have purchased a support membership).
Posts only show once reviewed. This is mainly preventive to keep spam away. Thank you for your understanding!
JQuery Easy stripping a little too much...
- kbrookes
-
Topic Author
- New Member
-
Less
More
IP: 124.171.225.8
13 years 11 months ago #1367
by kbrookes
JQuery Easy stripping a little too much... was created by kbrookes
Hi There,
I've been getting an odd error cropping up whenever jQuery Easy is enabled:
"Uncaught SyntaxError: Unexpected end of input"
I've traced it back to a bit of an odd interaction with the SqueezeBox script included with Joomla.
With jQuery Easy disabled, this script is inserted into the site by Joomla (with an additional var at the end by K2)
When I turn on jQuery Easy, this script is truncated to this:
What happens is that in addition to truncating this:
It also removes the closing }); statement for the preceding javascript.
Any ideas on how I could solve this one?
I attempted a preg replace, but so far with no success.
I've been getting an odd error cropping up whenever jQuery Easy is enabled:
"Uncaught SyntaxError: Unexpected end of input"
I've traced it back to a bit of an odd interaction with the SqueezeBox script included with Joomla.
With jQuery Easy disabled, this script is inserted into the site by Joomla (with an additional var at the end by K2)
Code:
<script type="text/javascript">
window.addEvent('domready', function() {
SqueezeBox.initialize({});
SqueezeBox.assign($$('a.modal'), {
parse: 'rel'
});
});
var K2SitePath = '/ode/';
jQuery.noConflict();
</script>
When I turn on jQuery Easy, this script is truncated to this:
Code:
<script type="text/javascript">
window.addEvent('domready', function() {
SqueezeBox.initialize({});
SqueezeBox.assign($$('a.modal'), {
parse: 'rel'
});
</script>
What happens is that in addition to truncating this:
Code:
var K2SitePath = '/ode/';
jQuery.noConflict();
It also removes the closing }); statement for the preceding javascript.
Any ideas on how I could solve this one?
I attempted a preg replace, but so far with no success.
- admin
-
- Administrator
-
Less
More
- Posts: 1931
IP: 109.211.5.162
13 years 11 months ago #1368
by admin
Olivier.
Replied by admin on topic Re: JQuery Easy stripping a little too much...
Hello,
I am away and cannot really look at this case closely for a few days but the thing you can do right now is set the option 'strip no conflict code' to 'no' and avoid the stripping.
You will have to determine which extension adds the jQuery.noConflict() code and see if you can turn it off. Depending on your configuration, that code may not even be a problem to leave in place.
I am away and cannot really look at this case closely for a few days but the thing you can do right now is set the option 'strip no conflict code' to 'no' and avoid the stripping.
You will have to determine which extension adds the jQuery.noConflict() code and see if you can turn it off. Depending on your configuration, that code may not even be a problem to leave in place.
Olivier.
- kbrookes
-
Topic Author
- New Member
-
Less
More
- Posts: 3
IP: 124.171.225.8
13 years 11 months ago #1369
by kbrookes
Replied by kbrookes on topic Re: JQuery Easy stripping a little too much...
Good call - I guess it really doesn't matter if there are multiple instances of the no conflict code in there.
That's fixed it, thanks
That's fixed it, thanks
- admin
-
- Administrator
-
Less
More
- Posts: 1931
IP: 109.211.5.162
13 years 11 months ago #1372
by admin
Olivier.
Replied by admin on topic Re: JQuery Easy stripping a little too much...
You are welcome.
I will use your example to help fix the stripping issue that you discovered.
I will use your example to help fix the stripping issue that you discovered.
Olivier.
- admin
-
- Administrator
-
Less
More
- Posts: 1931
IP: 207.229.172.231
13 years 7 months ago - 13 years 7 months ago #2063
by admin
Olivier.
Replied by admin on topic Re: JQuery Easy stripping a little too much...
I have finally figured out why the code was getting stripped. I have found out what was wrong after testing the issue on a user's test site. I could not reproduce the problem on my own test sites.
Version v1.4.3 will address this and hopefully will put an end to these annoying (but rare) errors.
Thank you Cyril for your contribution.
Version v1.4.3 will address this and hopefully will put an end to these annoying (but rare) errors.
Thank you Cyril for your contribution.
Olivier.
Last edit: 13 years 7 months ago by admin.
- kbrookes
-
Topic Author
- New Member
-
Less
More
- Posts: 3
IP: 124.148.33.213
13 years 7 months ago #2064
by kbrookes
Replied by kbrookes on topic JQuery Easy stripping a little too much...
Ironically, I believe the latest update to K2 2.6.6 removes the offending line anyway!
But thank you!
But thank you!
