joomla / joomla-cms

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

No blank module for discover_install route #43788

Open brbrbr opened 1 month ago

brbrbr commented 1 month 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 1 month 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 1 month ago

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

chmst commented 1 month 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 1 month 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 1 month ago

Thanks for this information. Need to inverstigate.

Hackwar commented 3 weeks 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.