joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[5.1] Bad message in User Action Log on Joomla update

Open dautrich opened this issue 2 years ago • 4 comments

Steps to reproduce the issue

  1. Update a Joomla 4.3.4 installation to Joomla 4.4.0
  2. Look into the User Action Log

Expected result

There is a message "User xxx updated Joomla from 4.3.4 to 4.4.0"

Actual result

Before the correct message, an additional message is thrown: "User xxx updated Joomla from Unknown to 4.4.0"

grafik

System information (as much as possible)

Joomla 4.4.0 PHP 8.2.2 MySQL 8.0.33

Additional comments

dautrich avatar Oct 18 '23 12:10 dautrich

Confirmed

image

brianteeman avatar Oct 18 '23 12:10 brianteeman

I have changed the title of the issue because it still applies to Joomla 5.1 as well as to the previous versions:

grafik

dautrich avatar Apr 22 '24 10:04 dautrich

This happens because the event onJoomlaAfterUpdate triggered twice in UpdateModel. First time without version https://github.com/joomla/joomla-cms/blob/a7bba710c3f4447301632f67d18645ebe3ae809a/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php#L885 And then again but with version https://github.com/joomla/joomla-cms/blob/a7bba710c3f4447301632f67d18645ebe3ae809a/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php#L912

And the action log store log for both.

The first trigger should be removed, however I am not sure what backward compatibility effect it can have on 3rd plugins.

It for ALL Joomla versions: 3.x, 4.x, 5.x

Fedik avatar Jun 09 '24 13:06 Fedik

Hmm should be ok to remove the first one. Only the user state file is deleted before the second event is called, don't know if this is/should be used by 3rd party at all.

HLeithner avatar Jun 10 '24 08:06 HLeithner

The issue still exists for J4.4, but has obviously been corrected for J5.2.x.

dautrich avatar Mar 05 '25 08:03 dautrich