J3 Issue ?
avatar coolcat-creations
coolcat-creations
2 Sep 2019

Steps to reproduce the issue

I could reproduce this issue today 17x times at an university where I showed step by step how to install Joomla including German language.

The computers used localhost and MAMP, internet connection was stable and existing.
When going to the step to install languages the kids clicked on [X] German DE and on Next,
Then they clicked everywhere on yes at the multilanguage settings, but only english was displayed as a language. Going back we made sure that German was ticked and tried again. There was no "loading" symbol before being on the Multilanguage settings page.

Trying myself and being in the same network but on a Mac it worked without any issues.

Installing the language afterwards did not fail, so I see no reason why it failed during installation.

Expected result

  1. The language should be installed
  2. If the language could not be installed, an error message should appear why it could not be installed

Actual result

  1. There was no error message and the language was missing
  2. Multilanguage setup was done altough the site had only one language

System Information

3.9.11

avatar coolcat-creations coolcat-creations - open - 2 Sep 2019
avatar joomla-cms-bot joomla-cms-bot - change - 2 Sep 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Sep 2019
avatar coolcat-creations coolcat-creations - change - 2 Sep 2019
Title
[3.11.x] Installation of additional languages fails without error message
[3.9.11] Installation of additional languages fails without error message
avatar coolcat-creations coolcat-creations - edited - 2 Sep 2019
avatar coolcat-creations coolcat-creations - change - 2 Sep 2019
The description was changed
avatar coolcat-creations coolcat-creations - edited - 2 Sep 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 2 Sep 2019
Labels Added: J3 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 2 Sep 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 2 Sep 2019
The description was changed
avatar franz-wohlkoenig franz-wohlkoenig - edited - 2 Sep 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 2 Sep 2019
Title
[3.9.11] Installation of additional languages fails without error message
Installation of additional languages fails without error message
avatar franz-wohlkoenig franz-wohlkoenig - edited - 2 Sep 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 2 Sep 2019
Status New Discussion
avatar alikon
alikon - comment - 3 Sep 2019

i've tested few times without issue (maybe 17 is an unlucky number ? )
@infograf768 can you have a look ?

avatar coolcat-creations
coolcat-creations - comment - 3 Sep 2019

The problem is only partly that the installation failed. I see the problem more in that fact, that if it it fails, there is no errormessage or anything. There seems checks to be missing. So it's also hard to know why nothing happended.

avatar infograf768
infograf768 - comment - 3 Sep 2019

I never encountered the issue here. Macintosh, localhost.
What was the difference between the "kids" computers and your Mac would be interesting to know on one hand.
And yes, if downloading/installing a language failed, we should have a message.

In J3 as well as J4, the check is done (j3 in InstallationModelLanguages, j4 in class LanguagesModel extends BaseInstallationModel method install($lids) by this code:

			// Get the URL to the XML manifest file of the selected language.
			$remote_manifest = $this->getLanguageManifest($id);

			if (!$remote_manifest)
			{
				// Could not find the url, the information in the update server may be corrupt.
				$message = JText::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_LANGUAGE', $language->name);
				$message .= ' ' . JText::_('INSTL_DEFAULTLANGUAGE_TRY_LATER');

				JFactory::getApplication()->enqueueMessage($message, 'warning');

				continue;
			}

			// Based on the language XML manifest get the URL of the package to download.
			$package_url = $this->getPackageUrl($remote_manifest);

			if (!$package_url)
			{
				// Could not find the URL, maybe the URL is wrong in the update server, or there is no internet access.
				$message = JText::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_LANGUAGE', $language->name);
				$message .= ' ' . JText::_('INSTL_DEFAULTLANGUAGE_TRY_LATER');

				JFactory::getApplication()->enqueueMessage($message, 'warning');

				continue;
			}

And further down we have another check with same warning:

			// Download the package to the tmp folder.
			$package = $this->downloadPackage($package_url);

			// Install the package.
			if (!$installer->install($package['dir']))
			{
				// There was an error installing the package.
				$message = JText::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_LANGUAGE', $language->name);
				$message .= ' ' . JText::_('INSTL_DEFAULTLANGUAGE_TRY_LATER');

				JFactory::getApplication()->enqueueMessage($message, 'warning');

				continue;
			}

Without knowing what has precisely happened to your kids, the only solution I see would be to add another error checking if the language is really existing now in the site/language folder or in data.

Concerning multilang install (it concerns only J3) we should add a check in /installation/controller/setdefaultlanguage.php method execute()

after if ((int) $data['activateMultilanguage'])

I guess checking first with $siteLanguages = $model->getInstalledlangsFrontend(); (or getLanguagelist) for the number of languages installed and returning error if only one.

$siteLanguages = $model->getInstalledlangsFrontend();

avatar coolcat-creations
coolcat-creations - comment - 3 Sep 2019

Ok I just tried with one of their PCs as they were gone...
Unfortunately I could not reproduce it now on their PCs either.
Yesterday definetly just nothing happened, when checking the language, no download or install was triggered. I tried it 3-4 times.
Could be maybe that the language server was down for a moment?

avatar infograf768
infograf768 - comment - 3 Sep 2019

Could be maybe that the language server was down for a moment?

yes, it could or, rather, joomlacode which contains the packs.
But in that case we should have had an error from the code I pasted above.
Anyway I will try to introduce at least an error if there is only one language present when using multilingual.

avatar coolcat-creations
coolcat-creations - comment - 3 Sep 2019

Thank you :-)

avatar infograf768
infograf768 - comment - 4 Sep 2019

Please test #26161
Closing as we have a patch

avatar infograf768 infograf768 - close - 4 Sep 2019
avatar infograf768 infograf768 - change - 4 Sep 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-09-04 08:56:23
Closed_By infograf768
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 Sep 2019

Closed as having Pull Request #26161

Add a Comment

Login with GitHub to post a comment