Install kunena 6.1 alpha 2
Go to menu - mainmenu
When clicking on publish item, the icon should be green.
The view said the item is unpublished, but when you open the menu item, you will see its published.
Joomla! 4.0.0-alpha9-dev Development [ Amani ] 19-April-2019 09:23 GMT
PHP Version | 7.3.2
Labels |
Added:
?
|
Labels |
Added:
J4 Issue
|
Status | New | ⇒ | Discussion |
Its a joomla issue.
Please create a Menu Item Alias on mainmenu, then you will see the issue.
Hello,
My bad, I thought you said Kunena so it must have something to do with Kunena. I'll check again.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-04-28 01:13:40 |
Closed_By | ⇒ | 810 |
looks like a local issue then.
Reopen please. I can reproduce this issue. It was introduced with #24416, specifically this part https://github.com/joomla/joomla-cms/pull/24416/files#diff-94f7ebd2e6d116a7e0e4e66ae94f5e06R173.
@chetanmadaan please use the latest nightly.
Status | Closed | ⇒ | New |
Closed_Date | 2019-04-28 01:13:40 | ⇒ | |
Closed_By | 810 | ⇒ |
Status | New | ⇒ | Discussion |
I can reproduce when creating a Menu Item Alias or system links in general, not any other it seems.
confirm, but weird
I can apparently solve it here by modifying the model
/administrator/components/com_menus/Model/ItemsModel.php line 277 +
from
$query->select(
'CASE ' .
' WHEN a.type = ' . $db->quote('component') . ' THEN a.published+2*(e.enabled-1) ' .
' WHEN a.type = ' . $db->quote('url') . ' AND a.published != -2 THEN a.published+2 ' .
' WHEN a.type = ' . $db->quote('url') . ' AND a.published = -2 THEN a.published-1 ' .
' WHEN a.type = ' . $db->quote('alias') . ' AND a.published != -2 THEN a.published+4 ' .
' WHEN a.type = ' . $db->quote('alias') . ' AND a.published = -2 THEN a.published-1 ' .
' WHEN a.type = ' . $db->quote('separator') . ' AND a.published != -2 THEN a.published+6 ' .
' WHEN a.type = ' . $db->quote('separator') . ' AND a.published = -2 THEN a.published-1 ' .
' WHEN a.type = ' . $db->quote('heading') . ' AND a.published != -2 THEN a.published+8 ' .
' WHEN a.type = ' . $db->quote('heading') . ' AND a.published = -2 THEN a.published-1 ' .
' WHEN a.type = ' . $db->quote('container') . ' AND a.published != -2 THEN a.published+8 ' .
' WHEN a.type = ' . $db->quote('container') . ' AND a.published = -2 THEN a.published-1 ' .
' END AS published '
);
to
$query->select(
'CASE ' .
' WHEN a.type = ' . $db->quote('component') . ' THEN a.published+2*(e.enabled-1) ' .
' WHEN a.type = ' . $db->quote('url') . ' THEN a.published ' .
' WHEN a.type = ' . $db->quote('alias') . ' THEN a.published ' .
' WHEN a.type = ' . $db->quote('separator') . ' THEN a.published ' .
' WHEN a.type = ' . $db->quote('heading') . ' THEN a.published ' .
' WHEN a.type = ' . $db->quote('container') . ' THEN a.published ' .
' END AS published '
);
Since 1.7 we were using the MenusHtmlMenus
state()
method to display the state on the grid.
It considered the $enabled
status of the component and displayed a tip
Therefore not sure of the code above for the component as the helper method is not present anymore in 4.0
Note:
if we do not need anymore $enabled
for the component, we could simplify the whole query select by taking off the CASE
, simply using:
$query->select(
$this->getState(
'list.select',
$db->quoteName(
array(
'a.id', 'a.menutype', 'a.title', 'a.alias', 'a.note', 'a.path', 'a.link', 'a.type', 'a.parent_id',
'a.level', 'a.published', 'a.component_id', 'a.checked_out', 'a.checked_out_time', 'a.browserNav',
'a.access', 'a.img', 'a.template_style_id', 'a.params', 'a.lft', 'a.rgt', 'a.home', 'a.language',
'a.client_id', 'a.publish_up', 'a.publish_down'
)
)
)
);
What do you think?
Just found out we still have the state()
method in Service/HTML/Menus.php.
Shall we keep the method or just delete it too?
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-06-12 10:02:36 |
Closed_By | ⇒ | infograf768 |
Hi,
I tested and wasn't able to reproduce on default Joomla install. My best guess it has something to do with Kunena, which we shouldn't be worried about.
Thanks,
Chetan