Keyword

front end form close button is not working

  • Michael Green
  • Michael Green's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 2 months ago #141676 by Michael Green
front end form close button is not working was created by Michael Green
Hello,my front end form close button is not working in some instances and i believe its a javascript issue and im not all that good at java script. a little guidance would be great...
My findings are..
1... saving new or preexisting item seems to work well
2...close button seems to work ok when i open a pre existing item via front end
3..closing a new item via...(frontend form menu link) will not close..
4. Im noticing when i click close the browser url changes from ......[mywebsite.com/k2-edit] to......[mywebsite.com/k2-edit#] ....it adds the (#) sign at the end and will not respond....(not sure if this is normal)
6....getting this error from browser java console...( Uncaught TypeError: Cannot read property 'removeEvents' of null)

...any ideas how to resolve this?

thanks for all of your help...

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 2 months ago #141702 by Krikor Boghossian
Replied by Krikor Boghossian on topic front end form close button is not working
I tried to edit the yoursite .com/night-life/item/43-street-racing-event

And the form closed without an issue.
I got a js error however which was related to a 3rd party extension - the carousel.

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

  • Michael Green
  • Michael Green's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 2 months ago - 10 years 2 months ago #141747 by Michael Green
Replied by Michael Green on topic front end form close button is not working
Hey thanks for checking it out...I knew about the js error with the carousel and thanks for mentioning it....but let me be a little more clear...
It does work most times....editing an item does seem to work ok...its when i am in the form via new form menu link...and i try to close it...it will not respond..it instead displays a # sign at the end of the url...
could you please try this link
mywebsite.com/k2-edit and then do not save it...just close it ...it will not close...instead it adds a pound sign at the end of the link.
Last edit: 10 years 2 months ago by Michael Green.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 2 months ago #141758 by Krikor Boghossian
Replied by Krikor Boghossian on topic front end form close button is not working
Yes I can see the issue now,

Go this URL github.com/joomlaworks/k2/blob/master/media/k2/assets/js/k2.js

Copy this .js file and replace the /media/k2/assets/js/k2.js on your site.

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

  • Michael Green
  • Michael Green's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 2 months ago #141797 by Michael Green
Replied by Michael Green on topic front end form close button is not working
Sorry for my delay i was trouble shooting another issue with another software i will try it and get right back..thanks again

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

  • Michael Green
  • Michael Green's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 2 months ago #141799 by Michael Green
Replied by Michael Green on topic front end form close button is not working
that did not work at all...any idea what that means? thanks

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 2 months ago #141834 by Krikor Boghossian
Replied by Krikor Boghossian on topic front end form close button is not working
I can still see the old file at: media/k2/assets/js/k2.js?v=2.6.9&sitepath=/

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

  • Michael Green
  • Michael Green's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 2 months ago #141852 by Michael Green
Replied by Michael Green on topic front end form close button is not working
thanks again...sorry i reverted it back to original...forgot you were checking the link..
I have went back in and changed the k2.js file back to the file that you had given me..so if you get a chance could you check now..i will leave it there until you tell me otherwise...thanks again.
also ..and im not sure it its related but the buttons at the bottom of the article/content window are broken...they show up in the backed admin area but not via frontend editing form....heres and example
imgur.com/W4hKINm

thanks i will await your reply..

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

  • Michael Green
  • Michael Green's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 2 months ago - 10 years 2 months ago #141861 by Michael Green
Replied by Michael Green on topic front end form close button is not working
Im sorry but that js patch you gave me broke my k2 ....It would not longer save at all on the front end and the back end...
The tabs..for example...content/image/gallery/media/attachments were all broken out of the template and displayed under the content area one after another as opposed to being contained in the tabs...
I was very worried because after i went and reverted the js file back to the original....it still was broken...until i decided to clear the cache ..which seemed to return it to its original state...
Im not sure if this issue is better left alone as it is or if k2 is very unstable on my environment.
Also my article plugins such as simiple image gallery/image under the content area is broken as well and will not display buttons it just shows as text on top of one another without buttons...this was present as well before and after the patch you sent..
So i reverted it back to its original js file
Are you sure it was the missing semicolons that was causing my frontend close button to close or if it was something else? any idea whats wrong?
Last edit: 10 years 2 months ago by Michael Green. Reason: additional info

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 2 months ago #141884 by Krikor Boghossian
Replied by Krikor Boghossian on topic front end form close button is not working
The semicolons or lack of, where causing an issue on J! 3.4 multilingual sites.

To manually patch the K2 file copy this snippet
if(parent.$('sbox-overlay') != undefined) {
            		 parent.$('sbox-overlay').removeEvents('click');
            	}
            	if(parent.$('sbox-btn-close') != undefined) {
            		 parent.$('sbox-btn-close').removeEvents('click');
            	}

and paste ti over:
parent.$('sbox-overlay').removeEvents('click');
                parent.$('sbox-btn-close').removeEvents('click');

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

  • Michael Green
  • Michael Green's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 2 months ago - 10 years 2 months ago #141899 by Michael Green
Replied by Michael Green on topic front end form close button is not working
aaaaah..worked like a charm..thanks so much.. also any idea what may cause the plugin buttons not to display properly on the frontend edit form...it looks fine on the back end..
heres an example..
imgur.com/W4hKINm
Last edit: 10 years 2 months ago by Michael Green. Reason: forgot image

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 2 months ago #141933 by Krikor Boghossian
Replied by Krikor Boghossian on topic front end form close button is not working
This would from the template you are using.

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

More
9 years 3 months ago #150757 by diba.pro
Replied by diba.pro on topic front end form close button is not working
thanks you. it's work great

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 months ago #150760 by Krikor Boghossian
Replied by Krikor Boghossian on topic front end form close button is not working
You 're welcome :)

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

More
9 years 22 hours ago - 9 years 22 hours ago #154385 by Alan Sander
Replied by Alan Sander on topic front end form close button is not working
Hi there,

i think the revised k2.js code occurs an unexpectedly security error or this error will be occured by another trigger.

After replacing the old k2.js code with the new k2.js code from github on k2 component, we've recognized that is possible for normal registered user to get access to the backend, although they have no perrmission to the backend access.

If a registered user edit an item on frontend and click on the close button, he will forwarded to the Joomla backend.
Its also possible if you set the "Access Administration Interface perrmission" for this user at backend on "Denied".

We use the latest Joomla version, Joomla 3.5.1, and K2 component, 2.7.

Do you have an idea to solve this issue?

Best
Alan
Last edit: 9 years 22 hours ago by Alan Sander.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 5 hours ago #154412 by Krikor Boghossian
Replied by Krikor Boghossian on topic front end form close button is not working
Hello,

I do not think the redirection you are seeing is not happening from K2.
Furthermore the URL is index.php/item/add?tmpl=component, you are not getting redirected to the backend.

Which other extensions are you using?

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

More
8 years 11 months ago #154868 by Alan Sander
Replied by Alan Sander on topic front end form close button is not working
Hi Krikor,

we don't use any other extensions. We use only K2. I recognized, that the trigger occurs, if i also logged in in the backend and write a new item in frontend in a new browser tab, click on save and than on close.

Best AlanS

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

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Elite Member
More
8 years 11 months ago #154878 by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic front end form close button is not working
Hi,
Even though I agree with what Krikor mentioned I will try to reproduce the issue. Thank you for your report on this.

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


Powered by Kunena Forum