? PR-4.3-dev Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
5 Mar 2023

Pull Request for Issue # .

Summary of Changes

Currently, a module uses service provider (our new modern module structure) requires registering HelperFactory service provider. However, not all modules require Helper class to get required data, so module HelperFactory should be optional.

Testing Instructions

  1. Use Joomla 4.3 nightly build
  2. Install this updated version mod_custom.zip of mod_custom module (it's the result of this PR #39931 , rebuild the module with our new module structure)
  3. Create an instance of Custom HTML module. Assign it to certain pages on your site (or just All Pages)
  4. Delete the file administrator/cache/autoload_psr4.php

Actual result BEFORE applying this Pull Request

You got fatal error: Resource 'Joomla\CMS\Helper\HelperFactoryInterface' has not been registered with the container

Expected result AFTER applying this Pull Request

No error. The module is being displayed properly

Link to documentations

Please select:

  • [] Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • [] Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 5 Mar 2023
Category Libraries
avatar joomdonation joomdonation - open - 5 Mar 2023
avatar joomdonation joomdonation - change - 5 Mar 2023
Status New Pending
avatar joomdonation
joomdonation - comment - 5 Mar 2023

Ping @laoneo for taking a look at this change.

avatar joomdonation joomdonation - change - 5 Mar 2023
The description was changed
avatar joomdonation joomdonation - edited - 5 Mar 2023
avatar joomdonation joomdonation - change - 5 Mar 2023
The description was changed
avatar joomdonation joomdonation - edited - 5 Mar 2023
avatar laoneo
laoneo - comment - 5 Mar 2023

Not on the computer right now. Does this work when a module is overwriting the constructor and still has the ild signature? If that works then it is fine.

avatar joomdonation
joomdonation - comment - 5 Mar 2023

Does this work when a module is overwriting the constructor and still has the ild signature

I don't really know how to do that because there are no modules like that in core test the behavior. I would say that it should work well because what I really do here is make the parameter nullable.

But to be safe, would be great if you could look at this when you are on your computer. Thanks.

avatar toivo toivo - test_item - 7 Mar 2023 - Tested successfully
avatar toivo
toivo - comment - 7 Mar 2023

I have tested this item successfully on 7020065

Tested successfully in Joomla 4.3.0-beta4-dev of 7 March using PHP 8.1.10


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40017.

avatar carlitorweb carlitorweb - test_item - 8 Mar 2023 - Tested successfully
avatar carlitorweb
carlitorweb - comment - 8 Mar 2023

I have tested this item successfully on 7020065


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40017.

avatar Quy Quy - change - 8 Mar 2023
Status Pending Ready to Commit
Labels Added: PR-4.3-dev
avatar Quy
Quy - comment - 8 Mar 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40017.

avatar Quy Quy - change - 8 Mar 2023
Labels Added: ?
avatar obuisard obuisard - close - 10 Mar 2023
avatar obuisard obuisard - merge - 10 Mar 2023
avatar obuisard obuisard - change - 10 Mar 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-03-10 04:51:42
Closed_By obuisard
avatar obuisard
obuisard - comment - 10 Mar 2023

Thank you again Tuan @joomdonation :-)

avatar sandewt
sandewt - comment - 16 Mar 2023

Joomla 4.2 already contains modules with the module structure.

I have built a module for Joomla 4.2 according to the new structure. It doesn't work now, fatal error.

Is it possible, without too much trouble, to merge this PR into the Joomla 4.2 branch as well? Or still wait until Joomal 4.3 comes out?

avatar joomdonation
joomdonation - comment - 16 Mar 2023

@sandewt 4.2.9 is the last 4.2 release, so you will have to wait for 4.3.0 to have this issue fixed.

avatar sandewt
sandewt - comment - 16 Mar 2023

4.2.9 is the last 4.2 release, so you will have to wait for 4.3.0 to have this issue fixed.

Thanks Tuan.

Add a Comment

Login with GitHub to post a comment