User tests: Successful: Unsuccessful:
Pull Request for Issue #26109 .
New method getTota() n the model postinstall messages, as we no longer need the messages themselves but only the number.
Install the patch and see that the number is indicated correctly. Compare with the number of enabled entries in the Table for postinstall messages.
The number indicates the enabled messages .
The number is not correct. After a fresh installation it is 3.
no
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_postinstall Modules |
Labels |
Added:
?
|
I see the extra 2 items are PLG_SYSTEM_UPDATENOTIFICATION_POSTINSTALL_UPDATECACHETIME and PLG_SYSTEM_HTTPHEADERS_POSTINSTALL_INTRODUCTION_TITLE
but if there are no messages they should not be included in the count.
In database we have 5 records in the postinstall messages table which are all enbled. It seems it needs in addition to check the confition saved in the confition_file and condition_method columns of each of these records to see if it displayed or not, because the postinstall messages table doesn't have that information. Maybe that was the reson why the model currently is used like it is.
I don't know. My intention was mainly reducing database and other queries. With every reload of every view the same queries seems too much.
I myself never care about the number of messages. I would like to know if there are unread messages, and therfore a "!" would do it. But speaking only for myself
@chmst Showing only a sign if there are some messages or not might still lead to a wrong result if the rules tell that all messages shall not show up so they never have been closed by someone and so never get the enabled
column set to zero. I think this is a design problem of the postinstall messages themselves, that the result of a negative rules check doesn't lead to the enabled
column being zero, so currently your counter shows 5 instead of 3. Right now, a !
or somilar sign would be correct, but as I said, as soon you you have a count of n>0 instead of 0, the !
would be shown when it should't be shown.
Also the badge under System > Information > Installation Messages doesn't match.
@Quy But without this PR they show both the same, 3 on a new installation, right? And I see 3 when I go to the postinstall messages page. So the problem is we have 5 in database which have enabled=1, but only 3 are shown. I think this has to be solved by the procedure which decides if they are shown or not sets enabled=0 if a message is decided to be hidden e.g. due to suitable PHP versions or whatever.
Which is exactly what the referenced issue describes
It should be the number of applicable of messages minus the number of messages hidden by the user and not the total in the database.
This PR will have to include something similar to onProcessList
to exclude non-applicable messages.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-28 17:42:51 |
Closed_By | ⇒ | chmst | |
Labels |
Added:
?
|
Without the patch the Post Installation Messages icon says 3. The PIM screen shows 3 messages in the left panel and 5 Release News announcements. With the patch the PIM icon says 5 but the PIM screen has not changed. So I am not sure what the 5 refers to. Hide All Messages and Reset shows no change.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29702.