? ? Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
18 Jun 2020

Pull Request for Issue #26109 .

Summary of Changes

New method getTota() n the model postinstall messages, as we no longer need the messages themselves but only the number.

Testing Instructions

Install the patch and see that the number is indicated correctly. Compare with the number of enabled entries in the Table for postinstall messages.

Expected result

The number indicates the enabled messages .

Actual result

The number is not correct. After a fresh installation it is 3.

Documentation Changes Required

no

c38664b 18 Jun 2020 avatar chmst fix
avatar chmst chmst - open - 18 Jun 2020
avatar chmst chmst - change - 18 Jun 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jun 2020
Category Administration com_postinstall Modules
avatar chmst chmst - change - 18 Jun 2020
Labels Added: ?
avatar ceford
ceford - comment - 19 Jun 2020

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.

avatar ceford
ceford - comment - 19 Jun 2020

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.


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

avatar richard67
richard67 - comment - 19 Jun 2020

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.

avatar chmst
chmst - comment - 19 Jun 2020

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

avatar richard67
richard67 - comment - 19 Jun 2020

@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.

avatar Quy
Quy - comment - 20 Jun 2020

Also the badge under System > Information > Installation Messages doesn't match.

avatar richard67
richard67 - comment - 20 Jun 2020

@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.

avatar brianteeman
brianteeman - comment - 20 Jun 2020

Which is exactly what the referenced issue describes

avatar Quy
Quy - comment - 20 Jun 2020

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.

avatar richard67
richard67 - comment - 20 Jun 2020

@Quy This is clear. The problem is there is not just a column in database telling if a message is applicable. It needs to check the rules for that, as far as I understand.

avatar Quy
Quy - comment - 24 Jun 2020

This PR will have to include something similar to onProcessList to exclude non-applicable messages.

avatar PhilETaylor
PhilETaylor - comment - 4 Jul 2020

Also needs caching to NOT run the *_postinstall_condition on every page load! #29950

avatar chmst chmst - close - 28 Jul 2020
avatar chmst chmst - change - 28 Jul 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-07-28 17:42:51
Closed_By chmst
Labels Added: ?

Add a Comment

Login with GitHub to post a comment