bug: Dashboard and Calendar views use deprecated Sidebar::render() #250
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Dashboard\HtmlView.php(line 61) andCalendar\HtmlView.php(line 43) both call\Joomla\CMS\HTML\Sidebar::render()unconditionally. This class is deprecated in Joomla 5+ and will be removed in Joomla 6.The
MokoSuiteCrossHelper::addSubmenu()method already has a progressive approach -- it tries the modern$toolbar->getSubmenu()API first and falls back toSidebar::addEntry(). However, the two views still callSidebar::render()to capture the output, which:No other views in the component (Posts, Services, Templates, Logs, Analytics) use
Sidebar::render().Steps to Reproduce
Expected Behavior
Views should use only the modern toolbar submenu API on Joomla 5+, with no calls to the deprecated Sidebar class.
Fix
Remove
$this->sidebar = \Joomla\CMS\HTML\Sidebar::render();from both views and ensure the submenu helper only uses the modern API. The sidebar property assignment and any template references to$this->sidebarshould be removed.Branch created:
feature/250-bug-dashboard-and-calendar-views-use-dep