Joomla articles are unpublished if the author makes minor changes from Frontend

The Authors group is not entitled to publish. Good. Therefore, the editor / administrator makes a preliminary approval of any article.

The problem arises if the author decides to change an already published article. When he clicks “save” from the frontend, the item immediately becomes unpublished. (As a group of authors is not allowed to publish items). So this is a huge problem, at least for my case.

I want the articles to remain published after the initial approval of the administrator, even if the author makes adjustments. Any idea how to do something like this?

This logic is used as a way to do things in the Joomla core.

+6
source share
4 answers

You might want to switch from K2 to something like another, like EasyBlog ... Or just don't use K2. It seems like K2 defaults to executing a workflow that conflicts with yours.

Otherwise, you can change K2 according to your needs ... I really do not recommend changing extensions, because then you can no longer update them if you do not plan to make changes every time you update (which is a pain),

The problem is with the administrator / components / com _k2 / models / item.php. The following lines are the form of version 2.6.1, line 785.

if ($front) { if (!K2HelperPermissions::canPublishItem($row->catid) && $row->published) { $row->published = 0; $mainframe->enqueueMessage(JText::_('K2_YOU_DONT_HAVE_THE_PERMISSION_TO_PUBLISH_ITEMS'), 'notice'); } } 

If I understand you correctly, you want something more:

  if ($front) { $row->published = 1; if (!K2HelperPermissions::canPublishItem($row->catid) && $row->published && $isNew) { $row->published = 0; $mainframe->enqueueMessage(JText::_('K2_YOU_DONT_HAVE_THE_PERMISSION_TO_PUBLISH_ITEMS'), 'notice'); } } 

If I understand their model correctly, adding a check for $ isNew to the if statement will apply only post = 0 to new entries. Which, if I understand you, are the only ones you want to influence. Thus, if an article already exists and is published, it will always be published, unless the administrator changes it to unpublished.

I'm not sure if this will work the way I expect, so let me know.

+2
source

You must either allow authors to edit any item or disable the option to edit articles for authors.

+1
source

Go to joomla administration, go to menu k2 and in the User Groups tabs create a group called editors and give it access to the Publish item , then go back to the Users tab and place those users that you want to make their editor in the group of editors.

Make sure that users in the editing group have access to Front-end item editing and Edit any item .

Your problem is that your editors have Edit any item access, but they do not have access to the Publish item .

+1
source

The permission you want to set is actually in the settings of the k2 user group. Find Allow editing for items already published and set to yes .

At least this is true for v2. 2.6.7, although I do not think that any permission settings have changed from v.2.6.0 or earlier.

0
source

All Articles