No Code Attached Yet bug
avatar standa-bl
standa-bl
4 Aug 2026

When trying to edit a component container in your own admin menu, the message: "Call to a member function load() on null" is returned. The error is in the file "administrator/components/com_menus/tmpl/item/edit_container.php". On line 65, the following is called: "$lang->load("$extension.sys", JPATH_ADMINISTRATOR)", but the variable $lang is not defined. So, for example, on line 21, just add: "$lang = $this->getLanguage();".

avatar standa-bl standa-bl - open - 4 Aug 2026
avatar standa-bl standa-bl - change - 4 Aug 2026
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 4 Aug 2026
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Aug 2026
avatar chmst
chmst - comment - 8 Aug 2026

Thanks for reporting.
I see your code and it looks plausible. But I cannot replicate your issue.
Which Joomla Version? Which language are you using?
Could you describe waht you did exactly and maybe add a screenshot?

avatar standa-bl
standa-bl - comment - 9 Aug 2026

Hi,

he error occurs in any language version Joomla 6.1.2, including the default English version, when you create your own administrator menu and then try to edit the Components container in that custom menu.

Steps to reproduce:

Menus → Manage
Select: Administrator
Click New
Title: My admin menu
Unique Name: my-admin-menu
Select Import a Preset: Preset - Joomla Main Menu
Click Save & Close

Content → Administrator Modules
Open Admin Menu for editing
Select Menu to Show: My admin menu
Click Save & Close

Menus → My admin menu
Open Components for editing, the following error occurs: Call to a member function load() on null

Image

In the file: /administrator/components/com_menus/tmpl/item/edit_container.php the $lang object is used on line 65, but it is not initialized anywhere in the file.
It should therefore be sufficient to initialize the $lang object near the beginning of the file, e.g.: $lang = $this->getLanguage();
I have successfully tested this fix both by modifying the file directly and by creating an override in the Atum template. Until an official fix is available, I am using the template override.

Regards
Standa

avatar brianteeman
brianteeman - comment - 9 Aug 2026

confirmed the bug - thanks for the detailed instructions in how to replicate it

As you have a fix are you able to submit a pull request with the fix please

avatar QuyTon QuyTon - change - 11 Aug 2026
Labels Added: bug
avatar QuyTon QuyTon - labeled - 11 Aug 2026
avatar brianteeman
brianteeman - comment - 16 Aug 2026

As it didnt look like you were going to create a pull request I did it for you

avatar QuyTon QuyTon - change - 16 Aug 2026
Status New ⇒ Closed
Closed_Date 0000-00-00 00:00:00 ⇒ 2026-08-16 16:39:13
Closed_By ⇒ QuyTon
avatar QuyTon QuyTon - close - 16 Aug 2026
avatar QuyTon
QuyTon - comment - 16 Aug 2026

Please test PR #48252. Thanks.

avatar brianteeman
brianteeman - comment - 17 Aug 2026

@QuyTon why did you delete this issue? The practice now is not to delete an issue just because a PR is created.

avatar QuyTon
QuyTon - comment - 17 Aug 2026

This must have changed while I was not active with Joomla. Sorry I did not know. I will stop closing them. Thanks.

Add a Comment

Login with GitHub to post a comment