No Code Attached Yet
avatar brbrbr
brbrbr
13 Jul 2024

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

avatar brbrbr brbrbr - open - 13 Jul 2024
avatar joomla-cms-bot joomla-cms-bot - change - 13 Jul 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Jul 2024
avatar brianteeman
brianteeman - comment - 13 Jul 2024

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.

avatar brbrbr
brbrbr - comment - 13 Jul 2024

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

avatar chmst
chmst - comment - 17 Jul 2024

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?

avatar brbrbr
brbrbr - comment - 17 Jul 2024

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)

avatar chmst
chmst - comment - 17 Jul 2024

Thanks for this information. Need to inverstigate.

avatar Hackwar
Hackwar - comment - 2 Aug 2024

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:

  • if I install a module, I want to use it right away and this creating the module is okay.
  • discovering a module might happen with a host of other extensions and might not have the intention to use it right away, since it might just be a part of a package, which is now installed via discover.
  • for the same reason a package installation should not create instances of modules right away.

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

Add a Comment

Login with GitHub to post a comment