When a module extension is disabled in "Extension Manager", all the instances of existing modules appear unpublished in module manager list. On the contrary, they appear published if you enter editing one of them.
On the modules list, if the user clicks on the red cross or the "Publish" button in the toolbar, a message shows that the module has been successfully published, while looking at he module list, it still seems unpublished.
At this point, the user, which doesn't know that the extension has been disabled, can't know the reason why the module persists unpublished while the message says that it has been published.
Screenshot 1: In module list it seems unpublished
Screenshot 1: In editing mode the same module seems published
Described by astridx below.
Title |
|
Category | ⇒ | Administration UI/UX |
Labels |
Added:
?
|
Labels |
Added:
?
|
||
Build | master | ⇒ | staging |
Status | New | ⇒ | Confirmed |
I had a quicker look at this issue and I think the main problem is, that it is possible to disable an extension also there is a published module. That’s why the editing view is OK. Only the module list is wrong.
I found a solution for this failure in the module list view. First I realized, that in
\joomla-cms\administrator\components\com_modules\models\modules.php
on line 240 the query measured the value for published. It combined the published value from modules with the enabled value from the extension table.
$query->select(
$this->getState(
'list.select',
'a.id, a.title, a.note, a.position, a.module, a.language,' .
'a.checked_out, a.checked_out_time, **a.published+2*(e.enabled-1) as published,** a.access, a.ordering, a.publish_up, a.publish_down'
)
);
This leads to showing not the right values for published in this view.
I would suggest these changes in the file
\joomla-cms\administrator\components\com_modules\models\modules.php:
$query->select(
$this->getState(
'list.select',
'a.id, a.title, a.note, a.position, a.module, a.language,' .
'a.checked_out, a.checked_out_time, **a.published as published, e.enabled as enabled,** a.access, a.ordering, a.publish_up, a.publish_down'
)
);
So the value for published is not changed and is consistent with the table, but we can use the enabled value of the extension table.
The second change is in the view file
\joomla-cms\administrator\components\com_modules\views\modules\tmpl\default.php
Here I would show Icons only, if the extension is enabled:
<td class="center">
<?php
**if ($item->enabled>0)**
{
echo JHtml::_('grid.id', $i, $item->id);
}
?>
</td>
<td class="center">
<div class="btn-group">
<?php
**if ($item->enabled>0)**
{
echo JHtml::_('jgrid.published', $item->published, $i, 'modules.', $canChange, 'cb', $item->publish_up, $item->publish_down);
// Create dropdown items
JHtml::_('actionsdropdown.duplicate', 'cb' . $i, 'modules');
$action = $trashed ? 'untrash' : 'trash';
JHtml::_('actionsdropdown.' . $action, 'cb' . $i, 'modules');
// Render dropdown list
echo JHtml::_('actionsdropdown.render', $this->escape($item->title));
}
?>
</div>
</td>
So, in the module list view there would not show any icon. You can see an example in the attached file.
Is this a solution for this problem?
Should I open another issue for the problem, that it is possible to disable an extension, also there is a published module?
I am very new here. How can I attach this code to this issue?
attachement
Closing as we have a PR.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-06-20 15:11:45 |
Closed_By | ⇒ | Bakual | |
Build | master | ⇒ | staging |
I can confirm that behavior.
Steps I reproduced the issue while I use the English test data:
1. I checked that the Module Banners is active in Extensions | Module Manager.
2. Extensions | Extensions Manager | Manage -> I disabled the Banner Module
3. Now the Module Banners is unpublished in Extensions | Module Manager.
4. I click on the red cross and I find the message “1 module successfully published”, although no Module was published. The Module Banners is still unpublished.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7115.