Keyword

K2 - Cancel 'add new item' from frontend

More
14 years 1 week ago #80115 by Chatchai
Replied by Chatchai on topic K2 - Cancel 'add new item' from frontend
This problem happended because mootools cannot add an event to an element with "toolbar-cancel" id which is the cancel button. Maybe caused by some plugins or modules (for me, I suspect one of these contenttemplater, nonumberelements, ninjashadowbox, shoutbox).
The solution is to add onclick event directly to cancel button (located in components/com_k2/views/item/tmpl/form.php line~255) like this




Sorry for my bad english :)
Hope this help

Chatchai Waewviriya

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

More
14 years 5 days ago #80116 by Odin Mayland
Replied by Odin Mayland on topic K2 - Cancel 'add new item' from frontend
I don't know if this helps but I have discovered that if you login and click "My Page" and then click "Post a new item" the "K2 Add Item" screen appears on a popup and everything works fine.

This confirms that the issue/bug is only when you click "Add New Item" in the K2 login module.

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

More
14 years 5 days ago #80117 by Antonia Waren
Replied by Antonia Waren on topic K2 - Cancel 'add new item' from frontend
I was eventually able to solve my issue by rebuilding my site. I installed K2 first then tested that it was still working after every other extension I installed. I appreciate that not everyone can do this.

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

More
14 years 5 days ago #80118 by Odin Mayland
Replied by Odin Mayland on topic K2 - Cancel 'add new item' from frontend
I could not figure out a fix for this bug so I commented out this line in the k2 login module helper.php

/**
if(K2HelperPermissions::canAddItem())

$profile->addLink = JRoute::_('index.php?option=com_k2&view=item&task=add&tmpl=component');
*/

Now all I have to do is have a meeting with the client and all his staff and tell them that you have to login, click" My page", then click "Post a new item".

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

More
14 years 4 days ago #80119 by Bernard R.
Replied by Bernard R. on topic K2 - Cancel 'add new item' from frontend
POSSIBLE FIX FOR SAVE AND CLOSE BUTTON.

Not sure if this would work with everyone. It worked like a charm on my site.

(REMEMBER TO BACKUP YOUR FORM.PHP FILE BEFORE PROCEEDING WITH THIS FIX)

I added the following line of code to line 36 on form.php (located: components/com_k2_views/item/tmpl)

parent.$('sbox-window').close();

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

More
13 years 10 months ago #80120 by prophat prophat
Replied by prophat prophat on topic K2 - Cancel 'add new item' from frontend
It's not a bug with K2. You are using another module that doesn't play nice with K2. If it works from the user's page correctly, but not from the home page, compare which modules aren't being displayed on the user page, turn it off on the home page and see what happens.

 

One module that doesn't work for me was mod_googleWeather.

 

And Bernard R., that doesn't work properly. Sure it closes the window, but it leaves the content item checked out. You need to check the file in before calling .close()

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


Powered by Kunena Forum