Feature bug PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
22 Oct 2023

Pull Request for Issue #42149 .

Summary of Changes

Kind of b/c fix.
Adding a "loaded" flag to be able to distinct initialised $modules array from empty.
And fixed some comments.

Testing Instructions

Add to sytem plugin the event listener:

public function onPrepareModuleList(\Joomla\CMS\Event\Module\PrepareModuleListEvent $event)
{
  $event->updateModules([]);
  $event->setLoaded(true);
}

Example add it around here

final class Sef extends CMSPlugin
{

And visit the site page.

Actual result BEFORE applying this Pull Request

All modules is rendered

Expected result AFTER applying this Pull Request

No modules is rendered, only content is rendered

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 Fedik Fedik - open - 22 Oct 2023
avatar Fedik Fedik - change - 22 Oct 2023
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Oct 2023
Category Libraries
avatar ceford
ceford - comment - 23 Oct 2023

Sorry, I do not understand exactly how to test. I have a test site clone of joomla-cms with 5 checked out and test data installed. Exactly which plugin should that code be added to and exactly what should I look for before and after applying the patch.


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

avatar Fedik Fedik - change - 23 Oct 2023
The description was changed
avatar Fedik Fedik - edited - 23 Oct 2023
avatar Fedik Fedik - change - 23 Oct 2023
The description was changed
avatar Fedik Fedik - edited - 23 Oct 2023
avatar Fedik
Fedik - comment - 23 Oct 2023

I have updated description

what should I look for before and after applying the patch

Any page, can be also administrator. you will notice when the modules will disappear ?

avatar ceford
ceford - comment - 23 Oct 2023

After applying the patch, with the code inserted as suggested I see all of the frontend and backend modules have disappeared. However, I don't really know enough to be aware of any possible side effects. Better for me to leave testing to someone else!


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

avatar HLeithner
HLeithner - comment - 23 Oct 2023

I'm not really happy with the solution, I'm also not convinced that this is needed at all. It might be better done in some temp storage/variable for the current rendering. Also other plugins have to understand this behavior which sounds at least to me very uncommon.

avatar Fedik Fedik - change - 31 Oct 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-10-31 11:31:36
Closed_By Fedik
Labels Added: Feature bug PR-5.0-dev
avatar Fedik Fedik - close - 31 Oct 2023
avatar regularlabs
regularlabs - comment - 2 Nov 2023

Add a Comment

Login with GitHub to post a comment