joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.77k stars 3.65k forks source link

[3.9] Discover install error: Call to a member function children() on null #33862

Closed pranaymirchandani closed 3 years ago

pranaymirchandani commented 3 years ago

Steps to reproduce the issue

1) discover a module for installation by clicking on extensions->Manage->discover 2) select the extension and click install

Expected result

Module should install

Actual result

Get the error below 👎

An error has occurred. 0 Call to a member function children() on null C:\xampp\htdocs\libraries\src\Installer\Adapter\ModuleAdapter.php:161

Call stack -- # | Function | Location 1 | () | JROOT\libraries\src\Installer\Adapter\ModuleAdapter.php:161 2 | Joomla\CMS\Installer\Adapter\ModuleAdapter->getElement() | JROOT\libraries\src\Installer\InstallerAdapter.php:339 3 | Joomla\CMS\Installer\InstallerAdapter->discover_install() | JROOT\libraries\src\Installer\Installer.php:633 4 | Joomla\CMS\Installer\Installer->discover_install() | JROOT\administrator\components\com_installer\models\discover.php:202 5 | InstallerModelDiscover->discover_install() | JROOT\administrator\components\com_installer\controllers\discover.php:46 6 | InstallerControllerDiscover->install() | JROOT\libraries\src\MVC\Controller\BaseController.php:710 7 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT\administrator\components\com_installer\installer.php:19 8 | require_once() | JROOT\libraries\src\Component\ComponentHelper.php:402 9 | Joomla\CMS\Component\ComponentHelper::executeComponent() | JROOT\libraries\src\Component\ComponentHelper.php:377 10 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT\libraries\src\Application\AdministratorApplication.php:101 11 | Joomla\CMS\Application\AdministratorApplication->dispatch() | JROOT\libraries\src\Application\AdministratorApplication.php:159 12 | Joomla\CMS\Application\AdministratorApplication->doExecute() | JROOT\libraries\src\Application\CMSApplication.php:203 13 | Joomla\CMS\Application\CMSApplication->execute() | JROOT\administrator\index.php:51

System information (as much as possible)

System Information Setting | Value -- | --   PHP Built On | Windows NT DESKTOP-SAIL3J8 10.0 build 19041 (Windows 10) AMD64 Database Type | mysql Database Version | 5.5.5-10.1.26-MariaDB Database Collation | utf8_general_ci Database Connection Collation | utf8mb4_general_ci PHP Version | 7.3.13 Web Server | Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.13 WebServer to PHP Interface | apache2handler Joomla! Version | Joomla! 3.9.26 Stable [ Amani ] 13-April-2021 15:00 GMT Joomla! Platform Version | Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT User Agent | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36

Additional comments

richard67 commented 3 years ago

@pranaymirchandani Which module did make these problems?

PhilETaylor commented 3 years ago
Screenshot 2021-05-14 at 11 08 32

New profile pic - who dis?

richard67 commented 3 years ago

New profile pic - who dis?

@PhilETaylor Its 2 years older than the previous one, but closer to reality since I don't shave anymore.

PhilETaylor commented 3 years ago

Im guessing this file had an invalid XML with no files defined

https://github.com/joomla/joomla-cms/blob/08f0a31a849a52d0163a2262eac9a686af8996fd/libraries/src/Installer/Adapter/ModuleAdapter.php#L161

Please post the full XML file for the module here.

PhilETaylor commented 3 years ago

Its 2 years older than the previous one, but closer to reality since I don't shave anymore.

I have to keep updating mine to make me look balder and fatter every 6 months ;-)

pranaymirchandani commented 3 years ago

@pranaymirchandani Which module did make these problems?

Hi Richard,

a custom module

`<?xml version="1.0" encoding="utf-8"?>

mod_mwprofile_search_filters mod_mwprofile_search_filters.php ` Fixed it my bad this is where the problem was i misspelled extension as extention
PhilETaylor commented 3 years ago

same happens with that XML in Joomal4

Screenshot 2021-05-14 at 11 20 47
pranaymirchandani commented 3 years ago

caused by a typo sorry

PhilETaylor commented 3 years ago

extention doesnt look right ;-)

PhilETaylor commented 3 years ago

This probably should still be resolved, also the admin template is destroyed by the error :-(