J4 Issue ? ?
avatar chmst
chmst
7 May 2021

Steps to reproduce the issue

Go to a dashboard, Click "add a module".
Select a module, for example logged-users
A Modal opens for mdoule settings

Expected result

There is a save button like in former version:
grafik

Actual result

Save and Close button missing

grafik

System information (as much as possible)

Additional comments

avatar chmst chmst - open - 7 May 2021
avatar joomla-cms-bot joomla-cms-bot - change - 7 May 2021
Labels Added: J4 Issue ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 May 2021
avatar richard67 richard67 - change - 7 May 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-05-07 11:36:26
Closed_By richard67
avatar richard67 richard67 - close - 7 May 2021
avatar richard67
richard67 - comment - 7 May 2021

Closing as having a pull request. Please test #33631 . Thanks in advance.

avatar rjharishabh
rjharishabh - comment - 7 May 2021

Please reopen this issue as it's an important issue to be resolved as quickly as possible.
Thanks

avatar Quy Quy - change - 7 May 2021
Status Closed New
Closed_Date 2021-05-07 11:36:26
Closed_By richard67
avatar Quy Quy - reopen - 7 May 2021
avatar chmst chmst - change - 8 May 2021
Labels Added: ?
avatar chmst chmst - labeled - 8 May 2021
avatar PhilETaylor
PhilETaylor - comment - 8 May 2021

If anything should be a release blocker, this should.

avatar joomdonation
joomdonation - comment - 9 May 2021

Could we solve it by:

  1. Give the Save & Close button an ID like btnModalSaveAndClose
  2. Then add some inline javascript to https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_modules/tmpl/module/modal.php to remove hidden class from that button to make it shows. Something like:
use Joomla\CMS\Factory;

/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
$wa->addInlineScript('
    document.addEventListener("DOMContentLoaded", function() {
        saveCloseButton = window.parent.document.getElementById("btnModalSaveAndClose");
        saveCloseButton.classList.remove("hidden");        
    });
');

@Fedik @dgrammatiko Could that be solution?

avatar Fedik
Fedik - comment - 9 May 2021

@joomdonation a bit hacky but yes that should work

for note:
The root of the issue that the buttons should be within the frame, not parent.
I will add this to collection #32473 ?

avatar joomdonation
joomdonation - comment - 9 May 2021
avatar Fedik
Fedik - comment - 9 May 2021

but they are hidden for some reasons.

Yeap, they hidden because they does not need on "first step" where User should select the module,
and after User made a choose the frame reloads and the parent does not know it. That why I wrote in #32473 that all buttons should be rendered within the frame instead of parent, but it is for future improvement.

For now your suggestion should work.

avatar joomdonation
joomdonation - comment - 9 May 2021

OK. Thanks. @rjharishabh As you tried to work on this issue before, do you want to give it a try base on suggestion at #33630 (comment) ?

avatar rjharishabh
rjharishabh - comment - 9 May 2021

Thanks @joomdonation please test PR #33631

avatar alikon alikon - close - 9 May 2021
avatar alikon alikon - change - 9 May 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-05-09 07:45:56
Closed_By alikon
Labels Added: ?
Removed: ?
avatar alikon
alikon - comment - 9 May 2021

closing as we a have a pr #33631

Add a Comment

Login with GitHub to post a comment