? Pending

User tests: Successful: Unsuccessful:

avatar twister65
twister65
9 May 2019

Pull Request for Issue #24846 .

Summary of Changes

Load language on after initialise.

Testing Instructions

  • Enable/Disable a plugin.
  • Add/Update/Delete an extension, an article, an user, a group.
  • Publish/Unpublish/Trash/Archive an article, a categorie, a menu.
  • See the Latest Actions module in the Control Panel

Expected result

No constant value, the actionlog message is translated.

Actual result

As expected result.

Documentation Changes Required

avatar twister65 twister65 - open - 9 May 2019
avatar twister65 twister65 - change - 9 May 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 May 2019
Category Administration Language & Strings Front End Plugins
avatar twister65 twister65 - change - 9 May 2019
Title
Fix actionlog message value
[4.0] Fix actionlog message value
avatar twister65 twister65 - edited - 9 May 2019
avatar SharkyKZ
SharkyKZ - comment - 10 May 2019

This is not the right fix. The underlying issue has been discussed here #17444. Until it is fixed, plugin language files can be loaded manually with $this->loadLanguage() in onAfterInitialise().

avatar infograf768
infograf768 - comment - 10 May 2019

Diff would be

diff --git a/plugins/system/actionlogs/actionlogs.php b/plugins/system/actionlogs/actionlogs.php
index 521b510..0d4f97d 100644
--- a/plugins/system/actionlogs/actionlogs.php
+++ b/plugins/system/actionlogs/actionlogs.php
@@ -64,4 +64,23 @@
 
 	/**
+	 * Listener for the `onAfterInitialise` event
+	 *
+	 * @return  void
+	 *
+	 * @since   4.0
+	 */
+	public function onAfterInitialise()
+	{
+		if (!$this->app->isClient('administrator'))
+		{
+			return;
+		}
+
+		// Load plugin language files only when needed (ex: they are not needed in site client).
+		$this->loadLanguage();
+	}
+
+
+	/**
 	 * Adds additional fields to the user editing form for logs e-mail notifications
 	 *
avatar infograf768
infograf768 - comment - 10 May 2019

@twister65
Please modify your PR with the code above.

avatar twister65 twister65 - change - 10 May 2019
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 10 May 2019
Category Administration Language & Strings Front End Plugins Front End Plugins
avatar twister65 twister65 - change - 10 May 2019
Labels Removed: ?
avatar infograf768
infograf768 - comment - 10 May 2019

I have tested this item successfully on 4c4b0a8


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

avatar infograf768
infograf768 - comment - 10 May 2019

I have tested this item successfully on 4c4b0a8


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

avatar infograf768 infograf768 - test_item - 10 May 2019 - Tested successfully
avatar twister65 twister65 - change - 10 May 2019
The description was changed
avatar twister65 twister65 - edited - 10 May 2019
avatar twister65 twister65 - change - 10 May 2019
The description was changed
avatar twister65 twister65 - edited - 10 May 2019
avatar wilsonge
wilsonge - comment - 10 May 2019

protected $autoloadLanguage = true; you need to remove this class property otherwise it will always be loaded in the constructor anyhow?

avatar wilsonge wilsonge - close - 10 May 2019
avatar wilsonge wilsonge - merge - 10 May 2019
avatar wilsonge wilsonge - change - 10 May 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-05-10 21:18:36
Closed_By wilsonge
avatar wilsonge
wilsonge - comment - 10 May 2019

Thanks!

Add a Comment

Login with GitHub to post a comment