Install a plugin and try to access $parent-extension
in preflight
Getting the information about the current installed plugin
null
URL j5.2-dev PluginAdapter
protected function checkExistingExtension()
{
try {
$this->currentExtensionId = $this->extension->find(
['type' => $this->type, 'element' => $this->element, 'folder' => $this->group]
);
} catch (\RuntimeException $e) {
// Install failed, roll back changes
throw new \RuntimeException(
Text::sprintf(
'JLIB_INSTALLER_ABORT_ROLLBACK',
Text::_('JLIB_INSTALLER_' . $this->route),
$e->getMessage()
),
$e->getCode(),
$e
);
}
}
URL j5.2-dev InstallerAdapter
protected function checkExistingExtension()
{
try {
$this->currentExtensionId = $this->extension->find(
['element' => $this->element, 'type' => $this->type]
);
// If it does exist, load it
if ($this->currentExtensionId) {
$this->extension->load(['element' => $this->element, 'type' => $this->type]);
}
} catch (\RuntimeException $e) {
// Install failed, roll back changes
throw new \RuntimeException(
Text::sprintf(
'JLIB_INSTALLER_ABORT_ROLLBACK',
Text::_('JLIB_INSTALLER_' . $this->route),
$e->getMessage()
),
$e->getCode(),
$e
);
}
}
If you do the same for a extension, then $parent-extension
is available in preflight
because checkExistingExtension of InstallerAdapter loads the extension information.
PluginAdapter does not load the extension Information within checkExistingExtension.
Shouldn't load the PluginAdapter the plugin information like it is done by the InstallerAdapter for extensions?
Labels |
Added:
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-06-18 19:22:00 |
Closed_By | ⇒ | svanschu |