? Pending

User tests: Successful: Unsuccessful:

avatar nikosdion
nikosdion
14 Sep 2022

Summary of Changes

Added missing $user variable declaration in administrator/modules/mod_submenu/tmpl/default.php

Testing Instructions

  1. Edit administrator/components/com_content/presets/content.xml
  2. Change the COM_CONTENT_MENUS_ARTICLE_MANAGER entry adding a quicktask-permission attribute, i.e. change it to read:
<menuitem
	title="COM_CONTENT_MENUS_ARTICLE_MANAGER"
	type="component"
	element="com_content"
	link="index.php?option=com_content&amp;view=articles"
	quicktask="index.php?option=com_content&amp;task=article.add"
	quicktask-title="COM_CONTENT_MENUS_NEW_ARTICLE"
	quicktask-permission="core.create;com_content"
/>
  1. Go to the content dashboard (/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=content)

Actual result BEFORE applying this Pull Request

The page breaks with an error: “Call to a member function authorise() on null”

Expected result AFTER applying this Pull Request

The page works.

Documentation Changes Required

None

Side note

This issue was discovered while trying to set up a dashboard with a custom preset for my own component. That is to say, it affects all core and third party extensions since it's a very obvious omission when the view template was copied from mod_menu to mod_submenu and subsequently refactored.

Also note that the static code analysis in PhpStorm also caught the problem when I opened the affected file.

avatar nikosdion nikosdion - open - 14 Sep 2022
avatar nikosdion nikosdion - change - 14 Sep 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Sep 2022
Category Modules Administration
avatar wilsonge wilsonge - change - 14 Sep 2022
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-09-14 12:41:18
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 14 Sep 2022
avatar wilsonge wilsonge - merge - 14 Sep 2022
avatar wilsonge
wilsonge - comment - 14 Sep 2022

Merged on review. Thanks!

avatar nikosdion
nikosdion - comment - 14 Sep 2022

Thank you! I'm really hoping to move to Dashboards over the next few months.

Speaking of which, I have noticed a few things which can be improved in the InstallationScript to facilitate 3PDs using dashboards. Should I open an issue about my ideas to discuss it?

avatar brianteeman
brianteeman - comment - 14 Sep 2022

I have noticed a few things which can be improved in the InstallationScript to facilitate 3PDs using dashboards. Should I open an issue about my ideas to discuss it?

Please do. Not suprised it can be improved as it was an afterthought

Add a Comment

Login with GitHub to post a comment