Keyword

No Checkin - Admin can't edit [solved with Hack

  • Cindy Moore
  • Cindy Moore's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago - 8 years 10 months ago #149509 by Cindy Moore
When an item is added by another member on the fronted admin can't edit. No edit link and checking box next to item and selecting "edit" results in a message "[Item Title] currently being edited by another administrator". Like it is not checked in. Since there is no checkin function in K2 admin we need to find a way for admin to edit items that are submitted by our members. Since I have a few third party extensions on the site I decided to test this on a test bed with a fresh Joomla install, no third party templates or extensions. I have installed K2 from a fresh download from this site. I get the same behavior. Please advise.
imgur.com/sbTvK3S
EDIT
In an attempt to try to see why the menu item for the itemform felt like it needed to open in a new window with no navigation I have inadvertently fixed the admin edit issue at the same time. I am not very happy having to hack the core and would love if the option to open the item form in parent would simply be added to the next build - I think may users would be appreciative. I have tested what I have so far and, so far, I have had no poor results. I will be sure to post back and amend if I do experience issues from this hack. I will share what I have done to fix the Add New Item form menu item opening in parent window THIS SAME HACK ALSO FIXED editing item added by new user on frontend not possible when editing item from admin. The links to the item now appear and the item is editable from the admin AND the Add New item form opens in parent window now using the hack below...
The file changed is administrator > components > com_k2 > elements > itemform.php Line 21 - 34

Was:
window.addEvent('domready', function() {
	if($('request-options')) {
	   $$('.panel')[0].setStyle('display', 'none');
	}
	if($('jform_browserNav')) {
	   $('jform_browserNav').setProperty('value', 2);
	   $('jform_browserNav').getElements('option')[0].destroy();
	}
	if($('browserNav')) {
	   $('browserNav').setProperty('value', 2);
	   options = $('browserNav').getElements('option');
	   if(options.length == 3) {
	      options[0].remove();
           }
Now:
window.addEvent('domready', function() {
   if($('request-options')) {
      $$('.panel')[0].setStyle('display', 'none');
   }
   if($('jform_browserNav')) {
      $('jform_browserNav').setProperty('value', 0);
      $('jform_browserNav').getElements('option')[2].destroy();
   }
   if($('browserNav')) {
      $('browserNav').setProperty('value', 0);
      options = $('browserNav').getElements('option');
      if(options.length == 3) {
         options[0].remove();
      }
This is a hack and will be overwritten as soon as you update.
Last edit: 8 years 10 months ago by Cindy Moore.

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

More
8 years 10 months ago #149534 by Lefteris
Hi,

Your hack just changes the default behavior from opening the form in a new window to open in the current window. It has nothing to do with the checkin function. If your users close the window without clicking the "Close" button the item will remain locked ( this also occurs in administration area ) . In that case you have to use the "Global Check-in" option in the administration area.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum