- Posts: 15920
COMMUNITY FORUM
[SOLVED] Re: K2 front-end save and close
- Krikor Boghossian
- Offline
- Platinum Member
Thank you for your input, but I think there are several solutions posted on this thread.
If you are still facing issues you should describe your setup and the exact nature of the bug (JS, etc) to provide some insight.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Robert
- Offline
- New Member
- Posts: 5
Using K2 2.6 and Joomla 3 with a T3 framework template.
When I use a defoult J3 template it works fine, load my custom T3 template and edit screen crumbles to pieces. Layout is messed up and SAVE and CLOSE buttons do nothing : (
Okey I suspect it's this jQuery people keep talking about on here. BUT the thing is I'm not sure how to check if it's loading first or not. I have Coda2 and firebug. Could anyone please point mein the right direction or explains how to check for this in basic terms. How do I know what loads first and if JQuery is conflicting ???????
Please Log in or Create an account to join the conversation.
- Robert
- Offline
- New Member
- Posts: 5
Turned off jQuery, I think? and getting these errors in firebug.
ReferenceError: jQuery is not defined
[Break On This Error]
$(window).load(function(){
what-i...rthship (line 636)
ReferenceError: jQuery is not defined
[Break On This Error]
var $K2 = jQuery.noConflict();
k2.js (line 9)
TypeError: $K2 is not a function
[Break On This Error]
$K2(document).ready(function() {
what-i...rthship (line 53)
TypeError: $(...).load is not a function
[Break On This Error]
$(window).load(function(){
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
- Posts: 15920
Okey I suspect it's this jQuery people keep talking about on here. BUT the thing is I'm not sure how to check if it's loading first or not. I have Coda2 and firebug. Could anyone please point mein the right direction or explains how to check for this in basic terms. How do I know what loads first and if JQuery is conflicting ???????
You just need to open the source code and see the order of the scripts.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Robert
- Offline
- New Member
- Posts: 5
Please Log in or Create an account to join the conversation.
- Michael Mason
- Offline
- New Member
- Posts: 5
Really disappointed in K2. Time for a review I think.
Please Log in or Create an account to join the conversation.
- Nikos
- Offline
- New Member
- Posts: 17
kunle wrote: K2 v2.6.2
Php 5.3.10
MySQL 5.5.20
Joomla 2.5.8
I'm currently building a site offline using wampserver so after installing K2 I noticed neither 'Save & Close' nor 'Save & New' buttons worked in back-end.
Then in the JS error console (using firefox browser) I noticed these errors:
Get ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js
X ReferenceError: jQuery is not defined
Get ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js
X TypeError: $K2 is not a function
Since the system is not connected to internet I guessed the 'http' header for 'googleapis' might be the cause so here's what I did that fixed it:
Navagated to K2 Parameter i.e.
Parameters > Layouts & Views > CSS & JavaScript Settings > Backend jQuery & jQuery UI handling
By default it was set to 'Load a remote copy of jQuery & UI' so I switched this to 'Load a local copy of jQuery & UI' then saved the settings. Now the 'Save & Close' and 'Save & New' buttons works fine.
Went back to JS error console (using firefox browser) refreshed the screen and
'X ReferenceError: jQuery is not defined' and
'X TypeError: $K2 is not a function' errors are not shown anymore.
As soon as my site is developed & put on a hosting server I shall switch back to 'Load a remoted copy of jQuery UI to see If the error will return.
Thank you very much man that did the trick for me. So we have to use still the 1.8.x version of jquery in order to save and create items in frontend and of course to check permissions!
Merry Christmas everybody!
Please Log in or Create an account to join the conversation.
- Dimitris
- Offline
- New Member
- Posts: 2
All you need to do is add an ID to the close button in itemform.php:
<td id="toolbar-cancel" class="button">
<a class="toolbar" id="closebtn" href="#">.................
and then go up and after
submitform( pressbutton );
just add: jQuery('#closebtn').click();
Now when you click save, it will also click close :-)
Please Log in or Create an account to join the conversation.
- Dimitris
- Offline
- New Member
- Posts: 2
Please Log in or Create an account to join the conversation.