K2 item edit form pop up

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Thu Jun 13, 2013 3:10 am
Reply with quote
Report this post
I've got a problem with the K2 item edit form. The pop up login form is stripped of any styling, see attached image. Not sure if it is related but I can't save the target window to new window with navigation. When I try to save the new window with navigation setting it defaults back to new without navigation. Any suggestion on how I can fix this problem?
User avatar
Senior Boarder

GK User
Thu Jun 13, 2013 4:53 am
Reply with quote
Report this post
Seems like that is the content of the popup window but probably without popup effect which means there is a script conflict in your site.

Please post a link to your site so we can check.

See you around...
User avatar
Platinum Boarder

GK User
Thu Jun 13, 2013 4:55 am
Reply with quote
Report this post
Thanks for your help...the site is www.gaze.com.au/newsite1
User avatar
Senior Boarder

GK User
Thu Jun 13, 2013 4:58 am
Reply with quote
Report this post
Please also send me an user account so I can see edit icon / window :) My email is normanuk[at]live.co.uk.

Please make sure user account can edit k2 items and also include this topic link in your email.

See you around...
User avatar
Platinum Boarder

GK User
Thu Jun 13, 2013 5:18 am
Reply with quote
Report this post
Thanks for your help. I've emailed you the details. The only addition I have made to the quickstart package was to include the JCE editor.
User avatar
Senior Boarder

GK User
Thu Jun 13, 2013 5:44 am
Reply with quote
Report this post
This is working fine for me on the account you have created. I have tried with Firefox so either clear your browsers cache or let me know which browser you had this problem.

By the way I had to assign my username to site owner and then blogger user groups to test edit any item otherwise I would not see edit item link.

Let me know, see you around...
User avatar
Platinum Boarder

GK User
Thu Jun 13, 2013 5:56 am
Reply with quote
Report this post
The issue is with all browsers. Once you are logged in there are no problems. The problem is when an unregistered user clicks on the menu item blogs the login pop up appears as per the below image in every browser. Thanks for your help with trying to resolve this issue.
User avatar
Senior Boarder

GK User
Thu Jun 13, 2013 6:06 am
Reply with quote
Report this post
I see what you mean, I have thought this happens when clicking on edit item link : )

I ll check this in my server to see whether its a general issue with the template or it is only your site.

I ll post back in here.

See you around...
User avatar
Platinum Boarder

GK User
Thu Jun 13, 2013 6:19 am
Reply with quote
Report this post
Thanks. Appreciate your help.
User avatar
Senior Boarder

GK User
Thu Jun 13, 2013 6:53 am
Reply with quote
Report this post
Following is what is happening.

The way K2 is designed I don't think they have designed to have a menu item in main menu in public to submit content directly. So when K2 checks for permission and user is not logged in it redirects to login page in component view.

What I suggest you do is following.
Make your "Blog" menu to show only to registered users in joomla menu item so to see that menu item they have to login first so clicking on it will not trigger permission problem as long as you have also put those users to bloggers user group and they have permission to add content to bloggers category.

Otherwise we can edit following file so it works the way you want it. However obviously this is a general edit so other files will also show this page directly rather then component view.

File: components/com_k2/helpers/permissions.php
Lines: 144 and 148, we need to remove "&tmpl=component" part from below codes.
Original:
Line 144 :
Code: Select all
$mainframe->redirect('index.php?option=com_user&view=login&return='.$return.'&tmpl=component', JText::_('K2_YOU_NEED_TO_LOGIN_FIRST'), 'notice');

Line 148:
Code: Select all
 
$mainframe->redirect('index.php?option=com_users&view=login&return='.$return.'&tmpl=component', JText::_('K2_YOU_NEED_TO_LOGIN_FIRST'), 'notice');

With removed
Line 144:
Code: Select all
 $mainframe->redirect('index.php?option=com_user&view=login&return='.$return.'', JText::_('K2_YOU_NEED_TO_LOGIN_FIRST'), 'notice');

Line 148:
Code: Select all
$mainframe->redirect('index.php?option=com_users&view=login&return='.$return.'', JText::_('K2_YOU_NEED_TO_LOGIN_FIRST'), 'notice');


Also note when creating menu item > K2 Item edit form, on right you will see it automatically assigns Target Windows > New window, which forces the link to open in new window.

We can remove that part with javascript but let me know what you want to do first.

See you around...
User avatar
Platinum Boarder

GK User
Thu Jun 13, 2013 7:11 am
Reply with quote
Report this post
That's strange as the K2 item edit form is a a type of menu item. Do you know why am I unable to change the target window in the menu manager configuration? It won't let me change the setting to 'new window with navigation'. Is this somehow related to the problem?
User avatar
Senior Boarder

GK User
Thu Jun 13, 2013 7:15 am
Reply with quote
Report this post
I guess with tpl component view it was supposed to be a popup window that is why you don't have option to open link in same window.

No it is not related with your problem as it simply opens in new window rather then same window.
User avatar
Platinum Boarder

GK User
Fri Jun 14, 2013 5:48 am
Reply with quote
Report this post
Thanks Norman. I have changed the code as you have suggested. I believe I can make the menu item into an Iframe so that is does not come up as a pop up. The issue I have now is that when the user logs in the user details appear rather than the K2 edit form. Do you what I can do to get the from to appear?
User avatar
Senior Boarder

GK User
Fri Jun 14, 2013 5:56 am
Reply with quote
Report this post
I have tested this with few scenarios I think best thing for you to do is don't edit the files as that is general code it is used elsewhere and stops all other popup functions in K2 so best thing you can do is as I have said before make Blog menu item to be viewed in registered users then you won't have do deal with all of these problems.

Add in to your F.A.Q that user needs to be logged in to use Blog.
User avatar
Platinum Boarder


cron