- Posts: 22
COMMUNITY FORUM
comment-form error
- Casper Voogt
- Offline
- Junior Member
Less
More
13 years 8 months ago #80690
by Casper Voogt
Replied by Casper Voogt on topic comment-form error
I got this error too;
Error: $("comment-form").addEvent is not a function
Source File: www.mysite.com/joomla/components/com_k2/js/k2.js
Line: 13
I have K2 comments disabled, so why is k2.js trying to use addEvent on "comment-form" when there is no comment form? I had a Front Page Slideshow module showing, but disabled it. I also disabled my Superfish module and in fact all my modules, including mod_k2items. That fixed it. When I turned mod_k2items back on, the problem happened again. So it seems mod_k2items is conflicting with K2's own JS.
Error: $("comment-form").addEvent is not a function
Source File: www.mysite.com/joomla/components/com_k2/js/k2.js
Line: 13
I have K2 comments disabled, so why is k2.js trying to use addEvent on "comment-form" when there is no comment form? I had a Front Page Slideshow module showing, but disabled it. I also disabled my Superfish module and in fact all my modules, including mod_k2items. That fixed it. When I turned mod_k2items back on, the problem happened again. So it seems mod_k2items is conflicting with K2's own JS.
Please Log in or Create an account to join the conversation.
- Casper Voogt
- Offline
- Junior Member
Less
More
- Posts: 22
13 years 8 months ago #80691
by Casper Voogt
Update on my related issue with mod_k2items;
I was able to fix this by overriding /modules/mod_k2items/tmpl/default.php and removing these lines;
<script type="text/javascript" src="modules/mod_k2items/assets/jquery.min.js"></script>
<script type="text/javascript" src="modules/mod_k2items/assets/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", <?php echo $autoplay == 1 ? $speed : 0?>, true);
});
</script>
Casper Voogt said:
I got this error too;
Error: $("comment-form").addEvent is not a function
Source File: www.mysite.com/joomla/components/com_k2/js/k2.js
Line: 13
I have K2 comments disabled, so why is k2.js trying to use addEvent on "comment-form" when there is no comment form? I had a Front Page Slideshow module showing, but disabled it. I also disabled my Superfish module and in fact all my modules, including mod_k2items. That fixed it. When I turned mod_k2items back on, the problem happened again. So it seems mod_k2items is conflicting with K2's own JS.
Replied by Casper Voogt on topic comment-form error
Update on my related issue with mod_k2items;
I was able to fix this by overriding /modules/mod_k2items/tmpl/default.php and removing these lines;
<script type="text/javascript" src="modules/mod_k2items/assets/jquery.min.js"></script>
<script type="text/javascript" src="modules/mod_k2items/assets/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", <?php echo $autoplay == 1 ? $speed : 0?>, true);
});
</script>
Casper Voogt said:
I got this error too;
Error: $("comment-form").addEvent is not a function
Source File: www.mysite.com/joomla/components/com_k2/js/k2.js
Line: 13
I have K2 comments disabled, so why is k2.js trying to use addEvent on "comment-form" when there is no comment form? I had a Front Page Slideshow module showing, but disabled it. I also disabled my Superfish module and in fact all my modules, including mod_k2items. That fixed it. When I turned mod_k2items back on, the problem happened again. So it seems mod_k2items is conflicting with K2's own JS.
Please Log in or Create an account to join the conversation.
- mojito
- Offline
- Junior Member
Less
More
- Posts: 26
13 years 5 months ago #80692
by mojito
Replied by mojito on topic comment-form error
I have this issue while trying to run jomres with k2 albeit an older version of jomres 4.4 but k2 is latest 2.4 now.
This js conflict stuff does everyones head in. Once upon a time we learnt that standardisation was good. Lets have a big scrap in the car park and the winner gets their lib used by everything once and for all.
:(
This js conflict stuff does everyones head in. Once upon a time we learnt that standardisation was good. Lets have a big scrap in the car park and the winner gets their lib used by everything once and for all.
:(
Please Log in or Create an account to join the conversation.
- mojito
- Offline
- Junior Member
Less
More
- Posts: 26
13 years 5 months ago #80693
by mojito
Replied by mojito on topic comment-form error
I have now solved my jomres js error issue. But I still fear there is a conflict as I still have the k2 error but only on section which is using jomres
$("comment-form").addEvent is not a function
I dont think they have an option to run in no conflict mode. Does k2 have this ability.
$("comment-form").addEvent is not a function
I dont think they have an option to run in no conflict mode. Does k2 have this ability.
Please Log in or Create an account to join the conversation.
- mojito
- Offline
- Junior Member
Less
More
- Posts: 26
13 years 5 months ago #80694
by mojito
Replied by mojito on topic comment-form error
How do I override a module, is it the same for a component ?
Please Log in or Create an account to join the conversation.
- Francesc Llorens
- Offline
- New Member
Less
More
- Posts: 8
13 years 2 months ago #80695
by Francesc Llorens
Replied by Francesc Llorens on topic comment-form error
I had the same problem; it was originated by a conflict between MooTools and Jquery.
(See this post for insights about the problem:preventing-jquery-and-mootools )
I put a line calling JQuery 1.4.2 on the index.php of my template. Then, the familiar error of the blank page with the "refreshing" tex after k2 comment showed.
Also, the error console showed an error from k2.js, "$("comment-form").addEvent is not a function".
So I've ripped off the line calling the jquery, installed the JB Library plugin from Joomla Baboo (JB Library) and on the plugin parametres I chose the JQuery I was trying to load. The remove parameters and Mootools parameters weren't changed.
Now my template works perfect.
So, the problem is a JQuery conflict, search carefully what javascript libraries you load.
(See this post for insights about the problem:preventing-jquery-and-mootools )
I put a line calling JQuery 1.4.2 on the index.php of my template. Then, the familiar error of the blank page with the "refreshing" tex after k2 comment showed.
Also, the error console showed an error from k2.js, "$("comment-form").addEvent is not a function".
So I've ripped off the line calling the jquery, installed the JB Library plugin from Joomla Baboo (JB Library) and on the plugin parametres I chose the JQuery I was trying to load. The remove parameters and Mootools parameters weren't changed.
Now my template works perfect.
So, the problem is a JQuery conflict, search carefully what javascript libraries you load.
Please Log in or Create an account to join the conversation.
- Francesc Llorens
- Offline
- New Member
Less
More
- Posts: 8
13 years 2 months ago #80696
by Francesc Llorens
Replied by Francesc Llorens on topic comment-form error
--Edit--
Please Log in or Create an account to join the conversation.