- Posts: 36
COMMUNITY FORUM
front end form close button is not working
- Michael Green
-
Topic Author
- Offline
- Junior Member
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
-
- Offline
- Platinum Member
- Posts: 15920
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
-
Topic Author
- Offline
- Junior Member
- Posts: 36
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.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
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
-
Topic Author
- Offline
- Junior Member
- Posts: 36
Please Log in or Create an account to join the conversation.
- Michael Green
-
Topic Author
- Offline
- Junior Member
- Posts: 36
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Please Log in or Create an account to join the conversation.
- Michael Green
-
Topic Author
- Offline
- Junior Member
- Posts: 36
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
-
Topic Author
- Offline
- Junior Member
- Posts: 36
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?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
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
-
Topic Author
- Offline
- Junior Member
- Posts: 36
heres an example..
imgur.com/W4hKINm
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Please Log in or Create an account to join the conversation.
- diba.pro
-
- Offline
- New Member
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Please Log in or Create an account to join the conversation.
- Alan Sander
-
- Offline
- New Member
- Posts: 9
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
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
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.
- Alan Sander
-
- Offline
- New Member
- Posts: 9
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
-
- Offline
- Elite Member
- Posts: 169
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.