No Code Attached Yet J3 Issue
avatar philip-sorokin
philip-sorokin
6 Apr 2016

Steps to reproduce the issue

Create a simple simple system plugin. Let's call it aa, because we need to make it first in alphabetical order when we update extensions. The plugin files are the following:

aa.php

defined('_JEXEC')` or die('Restricted access');

class PlgSystemAa extends JPlugin
{	
}

aa.xml

<?xml version="1.0" encoding="UTF-8"?> 
<extension type="plugin" version="3.4" group="system" method="upgrade">
	<name>plg_system_aa</name>
	<version>1.0</version>
	<creationDate>2016-05-04</creationDate>
	<license>http://www.gnu.org/licenses/gpl-2.0.html</license>
	<scriptfile>installer.php</scriptfile>
	<files>
		<filename plugin="aa">aa.php</filename>
		<filename plugin="aa">index.html</filename>
	</files>
	<updateservers>
		<server type="extension" priority="1" name="Aa update server">http://addondev.com/share/test/aa.xml</server>
	</updateservers>
</extension>

installer.php

defined('_JEXEC') or die('Restricted access');

class PlgSystemAaInstallerScript
{
	protected $_counter = 0;
	
	public function preflight($type, $parent)
	{
		$this->_counter++;
		JFactory::getApplication()->enqueueMessage('Preflight called: ' . $this->_counter . ' time(s).');
	}
	
	public function postflight($type, $parent)
	{
		JFactory::getApplication()->enqueueMessage('Postflight called: ' . $this->_counter . ' time(s).');
	}
	
}

You can download this plugin from my website. Then we need to download any localization, let it be English (USA) translation and change the version in xml-manifest to the previous one:

<?xml version="1.0" encoding="UTF-8" ?>
<extension type="package" version="3.5" method="upgrade">
	<name>English en-US Language Pack</name>
	<packagename>en-US</packagename>
	<!-- <version>3.5.0.1</version> -->
	<version>3.5.0.0</version>

After installing the plugin and the language distributive, go to the Joomla Extension Manager, update tab. Update the extensions, see the result. I have made a video that shows the problem

Expected result

Installer methods are called once.

Actual result

Installer methods are called multiple times.

System information (as much as possible)

You can see on the video that the problem arises when the system plugin goes before the localization in the update order. When the plugin goes after the language distributive, the installer methods are called only once, as it is expected.

avatar addondev addondev - open - 6 Apr 2016
avatar brianteeman brianteeman - change - 6 Apr 2016
Category Installation
avatar brianteeman brianteeman - change - 6 Apr 2016
Labels Added: ?
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Apr 2017

@addondev can you confirm Issue on latest Staging too?


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 6 Apr 2017
Status New Information Required
avatar joomla-cms-bot joomla-cms-bot - edited - 6 Apr 2017
avatar philip-sorokin
philip-sorokin - comment - 11 Apr 2017

By now (RC2), the error still exists:

lang

avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Apr 2017
Status Information Required Needs Review
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Apr 2017

@addondev Thanks for Information, set Status "Needs Review" at Issue Tracker.


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

avatar rdeutz rdeutz - change - 13 Nov 2017
Status Needs Review Pending
avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar jwaisner jwaisner - change - 18 Jul 2020
Status Pending Confirmed
avatar brianteeman
brianteeman - comment - 23 Aug 2022

Thank you for raising this issue.

Joomla 3 is now in security only mode with no further bug fixes or new features.

As this issue doesn't relate to Joomla 4 it will now been closed.

If we are mistaken and this does apply to Joomla 4 please open a new issue (and reference this one if you wish) with updated details for testing in Joomla 4.
cc @zero-24

avatar zero-24 zero-24 - change - 23 Aug 2022
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2022-08-23 22:33:35
Closed_By zero-24
Labels Added: No Code Attached Yet
Removed: ?
avatar zero-24 zero-24 - close - 23 Aug 2022

Add a Comment

Login with GitHub to post a comment