?
avatar infograf768
infograf768
21 Feb 2017

Steps to reproduce the issue

Try to install this pack through Extensions=>Install=>Upload Package file
https://github.com/infograf768/fr-FR-3.x/releases/download/v3.7.0.1.beta2/fr-FR_joomla_lang_full_3.7.0v1.zip

Expected result

Installation goes OK

Actual result

Too few arguments to function JInstallerAdapterPackage::onExtensionAfterInstall(), 1 passed and exactly 2 expected

avatar infograf768 infograf768 - open - 21 Feb 2017
avatar joomla-cms-bot joomla-cms-bot - change - 21 Feb 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Feb 2017
avatar wilsonge
wilsonge - comment - 21 Feb 2017

This fixes the too few arguments error: 8744332. But installing that package is giving another error which I'm still working on fixing.

avatar infograf768
infograf768 - comment - 22 Feb 2017

Indeed, we now have
Call to undefined method JInstallerAdapterLanguage::set()

Note: Discover is also broken (for languages at least).

avatar infograf768
infograf768 - comment - 22 Feb 2017

@wilsonge
Tested changing from

		if (!file_exists($this->parent->getPath('extension_site')))
		{
			if (!$created = JFolder::create($this->parent->getPath('extension_site')))
			{
				$this->parent
					->abort(
					JText::sprintf(
						'JLIB_INSTALLER_ABORT',
						JText::sprintf('JLIB_INSTALLER_ERROR_CREATE_FOLDER_FAILED', $this->parent->getPath('extension_site'))
					)
				);

				return false;
			}
		}

to

		if (!file_exists($this->parent->getPath('extension_site')))
		{
			if (!$created = JFolder::create($this->parent->getPath('extension_site')))
			{
				throw new RuntimeException(
					JText::sprintf(
						'JLIB_INSTALLER_ABORT',
						JText::sprintf('JLIB_INSTALLER_ERROR_CREATE_FOLDER_FAILED', $this->parent->getPath('extension_site'))
					)
				);

				return false;
			}
		}

And I do get this:
screen shot 2017-02-22 at 09 25 22 1

avatar infograf768
infograf768 - comment - 22 Feb 2017

OK, I get it to install by adding the missing

$row->set('custom_data', '');
$row->set('system_data', '');

Still remaining the asset_id for the content language which could not be created.

avatar infograf768
infograf768 - comment - 22 Feb 2017

Uninstalling a language (installed after modifying the adapter as posted above) gives

Too few arguments to function PlgExtensionJoomla::onExtensionAfterUninstall(), 2 passed in /Applications/MAMP/htdocs/joomla_400/libraries/cms/plugin/plugin.php on line 322 and exactly 3 expected

avatar wilsonge
wilsonge - comment - 22 Feb 2017

Hmm I don't see why onExtensionAfterUninstall would only be getting two params https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/cms/installer/installer.php#L754 This passes 3 in. I'll look into this in a little bit!

avatar infograf768
infograf768 - comment - 22 Feb 2017

It looks anyhow (I let you make the patch with what I already proposed above) that the entire installer needs love and care: Install, Uninstall, Update, Discover. All fails on one type of extension or the other.

avatar wilsonge
wilsonge - comment - 22 Feb 2017

@mbabker can you just check JM's proposed patch for the set method. If abort is failing seems like there might be a deeper problem (that throwing the exception just covers up)

There probably will be. There's been some tidying up done of the installer code AND we rebuilt the plugin system. There's going to be lots of bugs. Just keep reporting them and I'll keep fixing them :)

avatar wilsonge
wilsonge - comment - 18 Mar 2017

I've fixed the plugin event. @csthomas can you look into the database queries here. there's a few places that is affected by custom_data and system_data (such as in #14409)

avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Mar 2017
Category Language & Strings
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2017
Status New Confirmed
avatar C-Lodder
C-Lodder - comment - 19 Apr 2017

@infograf768 - Just tested installing the language pack from the link you provided and it seems to be working now.

Ok to close?

avatar infograf768 infograf768 - change - 19 Apr 2017
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2017-04-19 10:44:51
Closed_By infograf768
avatar infograf768 infograf768 - close - 19 Apr 2017
avatar infograf768
infograf768 - comment - 19 Apr 2017

They install OK indeed. Will test again uninstall, etc.

avatar infograf768
infograf768 - comment - 19 Apr 2017

They uninstall OK here too.

avatar C-Lodder
C-Lodder - comment - 21 Apr 2017

This may need to be re-opened. You can install the zip via the extension manager, but can't via the langage manager.

Unable to find install package

avatar infograf768
infograf768 - comment - 21 Apr 2017

You mean through the Install Languages Manager.
That is normal.
The update site credentials are aimed at 3.x maxi and will not present any packs for a 4.x version.
We will have to create a new xml for that as well as a new repository for 4.x packs.

avatar C-Lodder
C-Lodder - comment - 21 Apr 2017

Ah fair enough. Thanks for clarifying

Add a Comment

Login with GitHub to post a comment