Skip to content

[4.0] Postinstall reset hide fix#33338

Merged
chmst merged 3 commits intojoomla:4.0-devfrom
YatharthVyas:postinstall-reset-hide-fix
Apr 27, 2021
Merged

[4.0] Postinstall reset hide fix#33338
chmst merged 3 commits intojoomla:4.0-devfrom
YatharthVyas:postinstall-reset-hide-fix

Conversation

@YatharthVyas
Copy link
Copy Markdown
Contributor

Pull Request for Issue #33307.
All the 6 mentioned problems are fixed by this PR.

Summary of Changes

The $eid variable was assigned it's value by $model->getJoomlaFilesExtensionId()) which always returns the ID of Joomla CMS (212). This was causing the form to behave strangely by not considering the value of the selected extension from the dropdown

Testing Instructions

Step 1: Run this SQL to add a fake post installation message (change the db prefix!)

INSERT INTO `o07n8_postinstall_messages` (`postinstall_message_id`, `extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`)
VALUES
	(99, 210, 'TEST', 'TEST', '', 'com_cpanel', 1, 'message', '', '', '', '', '4.0.0', 1);

Step 2: Visit the Post Installation Message screen and follow through:

Before the PR

  • Load page, note its Joomla CMS in the dropdown and you see its messages shown
  • Select Atum Administrator template from the drop down - see there is one message
  • While we are on the "Atum Administrator template" selected page, click Hide all messages button
  • Note the page reloads back to the Joomla CMS page and all the Joomla CMS Messages are HIDDEN (Problem 1).
  • Select Atum Administrator template from the drop down - see there is one message (Problem 2, it should have been hidden)
  • While we are on the "Atum Administrator template" selected page, click Hide this message button
  • Note that we are now showing messages for Joomla CMS and not "Atum Administrator template" (Problem 3)
  • Select Atum Administrator template from the drop down - see there is no message (Correct).
  • Click RESET MESSAGES
  • Note that we are now showing messages for Joomla CMS and not "Atum Administrator template" (Problem 4)
  • Note that we are now showing messages for Joomla CMS, when we reset messages for "Atum Administrator template" (Problem 5)
  • Select Atum Administrator template from the drop down - see there is no message (Problem 6 - they were reset so should be showing!).

After the PR:

Problem 1: Atum's page will be shown on reload and messages will be hidden
Problem 2: Atum's messages won't be visible
Problem 3: Messages shown will be of Atum
Problem 4: Page will reload to display Atum's messages
Problem 5: Reset will only affect Atum's messages
Problem 6: Atum's messages will be displayed

The Problems and fixes mentioned above are shown in the video below.

Actual result BEFORE applying this Pull Request

pr_before_post_hide.mp4

Expected result AFTER applying this Pull Request

pr_post_hide.mp4

Documentation Changes Required

None

The $eid was always assigned 212 (ID of Joomla CMS) by ` $model->getState('eid', $model->getJoomlaFilesExtensionId())`
Now, this value is dynamically assigned based on the value of `#adminForm`'s eid input field (extension options dropdown field)
$eid was always assigned the value of 212 (ID of Joomla CMS) by `getJoomlaFilesExtensionId())` Now it dynamically takes the id from the URL parameters.
Also, removed line 39 as the PHPCS suggested I do so.
@joomdonation
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on a416ce9


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

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Apr 26, 2021

I have tested this item ✅ successfully on a416ce9


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

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Apr 26, 2021

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 26, 2021
@Quy Quy added this to the Joomla 4.0 milestone Apr 26, 2021
@chmst chmst merged commit 64ebca6 into joomla:4.0-dev Apr 27, 2021
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 27, 2021
@chmst
Copy link
Copy Markdown
Contributor

chmst commented Apr 27, 2021

Thanks!

@YatharthVyas YatharthVyas deleted the postinstall-reset-hide-fix branch July 9, 2021 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants