Keyword

Frontend editing cancel (Joomla! v3.2 - K2 v2.6.7)

More
11 years 6 months ago #121057 by Derk
Hi there,

On the frontend, when using the item editor there's a problem,
the cancel button (Annuleren in Dutch) does not work.
I might have found the place in the HTML code:

Actual code, Joomla! v3.2 - K2 v2.6.7

<tr>
<td class="button" id="toolbar-save">
<a onclick="Joomla.submitbutton('save'); return false;" href="#" class="toolbar">
<span class="icon-32-save icon-save" title="Opslaan"></span> Opslaan </a>
</td>
<td class="button" id="toolbar-cancel">
<a href="#" class="toolbar">
<span class="icon-32-cancel icon-cancel" title="Annuleren"></span> Sluiten </a>
</td>
</tr>


Change this line:
<a href="#" class="toolbar">
To:
<a onclick="Joomla.submitbutton('cancel');" href="#" class="toolbar">

I still have to figure out what to change in the K2 (php?) file.
Maybe a developer for the K2 project can help? I don't know if my solution
is correct (for example, do I need to add return true or false???)

Thank you in advance for your time and effort!!!

Derk

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #121058 by Yiota
Maybe you are facing javascript issues in your page. Some kind of conflict. Check in your browser's console to see if you are getting any errors.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #121059 by Derk
Only a warning:
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #121060 by Yiota
Also check if your page loads more than one jQuery library or any other plugin or extension that could cause a conflict with this.
When the item page is loaded through the frontend editing window do you notice anything else breaking, like maybe the tabs?

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #121061 by Derk
All the other buttons/tabs work well,
I disabled all modules active on the page,
that does not help...
The JQeury, I've no idea, but tried to disable jquery in the K2 parameters
that makes no difference...
I can send you a private message with login information?

Thank you very much!!!

Derk

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #121062 by Yiota
Check if you are loading more than one jQuery library through the Network of your browser's inspector or for any strange javascript file that could cause this issue.
Also if you are using K2 template overrides make sure that the itemform.php has no changes between your own and the one inside the component's folder.
Question: What Joomla! and K2 version do you use?

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #121063 by Derk
The JQuery file in the /media/jui/js is not present on my server.
My joomla version is 3.2, my K2 version is now the svn, but maybe it's better to
get back to v2.6.7 (same problem, tried the svn to fix it, no succes...).
Which version of JQuery should I use, and where can I download it?
Just put the download in the /media/jui/js folder?

Derk

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #121064 by Yiota
I think that joomla! 3.2 has the 1.10.2 version of jQuery included in that media folder. You should better get it from another joomla! 3.2 installation package to be sure and put it in the correct folder.
Then check again.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago - 11 years 6 months ago #121065 by Derk
The jquery-1.10.2.min.map was missing, I downloaded it:
code.jquery.com/jquery-1.10.2.min.map
and also:
code.jquery.com/jquery-1.10.2.js
and put them in the /media/jui/js on my site.
That does not solve the problem.
Maybe it's something in the html generated? Adding:
Joomla.submitbutton('cancel');
makes it possible to close the frontend editor window...
---
<a class="toolbar" href="#" onclick="Joomla.submitbutton('cancel');">
<span title="Opslaan" class="icon-32-save icon-save"></span> Opslaan </a>
---
Edit: the striked lines were from the save button, I meant ofcourse the cancel button...

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #121066 by Derk
On another site, I saw the same html code (without the Joomla.submitbutton('cancel') )
and on that site the cancel button works fine, so it's not a html problem probably...

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #121067 by Derk
At the moment I use the Beez3 template, which has been modified by me.
I tried the Protostar template, this results in a different button 'cancel' and
works as expected.
I placed the modified k2.css in my Beez3 css folder, I will try to put the css
into the protostar css folder and check again if it works.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #121068 by Derk
After reinstalling Joomla! v3.2, with K2 v2.6.7 without any extras or modifications,
using the Beez3 template, the problem is still there.
No working frontend editing cancel button...
With this information you can reproduce the site that's not working,
I can also make a copy on an empty webdir from my hosting provider
and send you a personal message with login info.

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #121069 by Yiota
Please try with the protostar default joomla template.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #121070 by Derk
The cancel button does work with protostar,
the problem only happens with the beez3 template.

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #121071 by Yiota
This proves that we are dealing with javascript conflicts. Check the difference even in the order the javascripts are loading in protostar template and in your own template.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #121072 by Derk
At the moment I cannot find the problem,
that's why I made a clean site where people can try and fix stuff.

This is a Joomla! v3.2 site, set to the default Beez3 template.
K2 v2.6.7 installed.
All clean, not modified!!!
The close button in the frontend editor of K2 does not work.

Usernames and passwords are: getk2
(for example, the admin account: login: getk2 / password: getk2)
file/folder rights are set to 777.

The actual site:
getk2.datact.nl/
getk2.datact.nl/administrator

The site will stay here as long as needed or not abused.
please do not abuse my site, I do not give permission to use it for illegal stuff!

A big thank you in advance!

Derk

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #121073 by seeker
I have the same problem, if we edit an article close button doesnt work.
any help?
any new k2 version?

thanks

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 6 months ago #121074 by Yiota
The Beez3 template has issues.

@seeker
What template do you use?
Check for javascript conflicts in the frontend.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #121075 by Derk
If you do not load template.js the cancel button works,
but I still cannot exactly figure out why.
I hope someone can help seeker and me!

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #121076 by seeker
I have Bluestork template in administrator and JA university in site.

I dont know check for javascript conflicts in the frontend.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum