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:
defined('_JEXEC')` or die('Restricted access');
class PlgSystemAa extends JPlugin
{
}
<?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>
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
Installer methods are called once.
Installer methods are called multiple times.
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.
Category | ⇒ | Installation |
Labels |
Added:
?
|
Status | New | ⇒ | Information Required |
Status | Information Required | ⇒ | Needs Review |
@addondev Thanks for Information, set Status "Needs Review" at Issue Tracker.
Status | Needs Review | ⇒ | Pending |
Labels |
Added:
J3 Issue
|
Status | Pending | ⇒ | Confirmed |
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
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: ? |
@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.