joomla / joomla-cms

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

No blank module for discover_install route #43788

Open brbrbr opened 4 months ago

brbrbr commented 4 months ago

Steps to reproduce the issue

discover a module added to the system by ftp or similar

Expected result

blank unpublished module

Actual result

no blank unpublished module

this is inconsistent with a normal installation

brianteeman commented 4 months ago

this is inconsistent with a normal installation

Many modules do not create an unpublished instance of the module on installation. Something that I am always grateful for especially when installing a package that includes a large number of modules.

brbrbr commented 4 months ago

As I understand Installer/Adapter/ModuleAdapter::storeExtension it will always install a blank module for the installation route

chmst commented 4 months ago

Not sure if I understand correctly that your module is not installed at all via discover? You are sure that the .xml file of the module is correct?

brbrbr commented 4 months ago

The issue report is not for a specific module. A module is installed and added to the extensions table for both the discover_install and normal installation.

The discover_install returns after adding the module as extension. (https://github.com/joomla/joomla-cms/blob/4.4-dev/libraries/src/Installer/Adapter/ModuleAdapter.php#L554)

While the normal installation adds a new unpublished module (https://github.com/joomla/joomla-cms/blob/4.4-dev/libraries/src/Installer/Adapter/ModuleAdapter.php#L637)

chmst commented 4 months ago

Thanks for this information. Need to inverstigate.

Hackwar commented 4 months ago

I could have sworn that the module instance is not created, but you are right. Upon regular installation, an unpublished instance of the module is created. I'm not sure if I like it... I would argue, that this is intended behavior the way it is now because:

I'm going to bring this up in the maintainers meeting to see what the consensus is.