User tests: Successful: Unsuccessful:
Pull Request for Issue #33311
And I think this also improves the PR for #29950
Edit: The caching part implemented in this PR is not the most optimal way to do it. Thanks, @PhilETaylor for helping me understand this. So for now, I'm striking out the caching part and I'm keeping this PR open as it still fixes Issue #33311
Wherever I've mentioned Caching in this PR, it is only valid when Caching has been enabled from the global configuration settings.
getItems()
function from Post Installation Messages Component's Messages ModelgetItemsCount()
function that only returns the count
(in integer) of all messages from the database not filtered by the default extension id (eid). Hence this count reflects all the array elements and not just the ones corresponding to Joomla CMS (for example)You might observe that I've only queried 4 columns in this query.
$db->quoteName('language_extension'),
$db->quoteName('language_client_id'),
$db->quoteName('condition_file'),
$db->quoteName('condition_method'),
This is done because the onProcessList()
function that filters the language and extra messages uses these 4 fields. Check the link below
Firstly, make sure you have enabled Caching is enabled in Admin Panel -> Global Configuration -> System
INSERT INTO `jos_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);
Reload the admin home page.
Note: 24 Queries after 2 refreshes (2 refreshes are done to ensure that caching is successful)
Note: Still 24 queries (caching works) after 2 refreshes and the count displayed (4) is correct as it corresponds to 3 of Joomla CMS + 1 of Atum Administrator Template
You might encounter a bug while deleting and resetting messages here. Please add #33338 to ensure that you can hide and reset messages easily
Also fixed dashboard badge: (Found in Admin Panel -> System)
I am not sure but if documentation for the Post Installation messages component exists for Joomla 4 then this new function getItemsCount()
should be mentioned under the Messages Model and the rephrased variable (integer) $messagesCount
must be mentioned in Post Installation Modules Documentation
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_postinstall Modules |
Labels |
Added:
?
|
I have tested this item
Count of notifications works but look is messed (maybe because of conflicting files?):
I have tested this item
Reason for unseccessfully test coming soon.
This branch has conflicts that must be resolved
Conflicting files
administrator/modules/mod_post_installation_messages/tmpl/default.php
Labels |
Added:
Conflicting Files
|
I have tested this item
Thank you.
As correctly identified, the culprit here was the conflicting file. It is now rectified and should work properly.
@maikol-ortigueira can you please retest?
I have not tested this item.
I have tested the patch and it works perfectly. In the previous test I had used the previous version of the Atum template, and maybe that was the reason for not receiving the same defects commented by @sandramay0905.
This test I have done with the new version of the template.
Joomla version: 4.0.0-beta8-dev
PHP version: 7.4.13
Thank you
I have not tested this item.
I have tested the patch and it works perfectly. In the previous test I had used the previous version of the Atum template, and maybe that was the reason for not receiving the same defects commented by @sandramay0905.
This test I have done with the new version of the template.
Joomla version: 4.0.0-beta8-dev
PHP version: 7.4.13
Thank you
I have tested this item
Sorry for having made the same comment three times, I had not marked the test successfully in the previous messages.
@sandramay0905 and @maikol-ortigueira I really appreciate all the efforts you took in going through the lengthy testing instructions to ensure everything works correctly. I am grateful for your time spent in re-testing it again after the UI repaint update.
Thank you
Labels |
Removed:
Conflicting Files
|
Conflicting files
administrator/modules/mod_post_installation_messages/tmpl/default.php
@sandramay0905 @maikol-ortigueira sorry to bother you :) bit would you please repeat your tests? Thank you!
I have tested this item
I have tested this item
Resolved a conflict. Could you please retest this PR @sandramay0905 and @Krshivam25
Much thanks
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-06-05 09:25:52 |
Closed_By | ⇒ | chmst | |
Labels |
Added:
?
|
Thanks!
Thanks everyone!
I have tested this item✅ successfully on 63cfd3c
I have tested the patch and on my local server it worked perfectly. Before applying the patch it showed me 3 messages in total and once applied it shows me 4 Post installation messages. Curiously before applying the patch and applying the 2 refreshes it shows 24 queries and 3 messages and after applying the patch and performing the 2 refreshes it shows 23 queries.
Thank you.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33344.