?
avatar astridx
astridx
1 Mar 2020

Steps to reproduce the issue

  1. Install Joomla 4
  2. Install the language German and Persian (edit: Make the installation of the languages while with the installation of Joomla)
  3. Check the Content Languages System > Manages > Content Languages

Expected result

You see Persian and German language or see no of this languages and you have to create all the Content Languages yourself.

Actual result

Persian Language for Content is created. You have to install the German Content Language yourself.

avatar astridx astridx - open - 1 Mar 2020
avatar joomla-cms-bot joomla-cms-bot - change - 1 Mar 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Mar 2020
avatar infograf768
infograf768 - comment - 1 Mar 2020

Have you installed the languages at the same time as J install, or later after logging into admin and using the Install Languages manager?

avatar richard67
richard67 - comment - 1 Mar 2020

Yes, I wanted to ask the same. When doing it later in backend I don't have that problem, but when doing it with the installation I can confirm.

avatar astridx
astridx - comment - 1 Mar 2020

Sorry, yes I did it with the installation.

avatar astridx astridx - change - 1 Mar 2020
The description was changed
avatar astridx astridx - edited - 1 Mar 2020
avatar astridx astridx - change - 1 Mar 2020
The description was changed
avatar astridx astridx - edited - 1 Mar 2020
avatar infograf768
infograf768 - comment - 1 Mar 2020

Then, this is a recent issue as it was working ok before.

avatar astridx astridx - change - 1 Mar 2020
The description was changed
avatar astridx astridx - edited - 1 Mar 2020
avatar astridx
astridx - comment - 1 Mar 2020

This is strange. Now I can no longer reproduce that. For me no content language is created anymore. Not even for Persian.
But the Persian Content Language was create in the Past and I didn't do it.
How should it work? I really do not know: Should the Content Language be created automatically if a language is installed?

avatar infograf768
infograf768 - comment - 1 Mar 2020

One aspect to know:
If the language already exists in the languages folders, then the content language may not be created when installing J again.

Normally it should work fine when it is a totally clean install.

avatar astridx
astridx - comment - 1 Mar 2020

That is the explanation. I had only run npm ci and deleted the configuration.php.

Now I've deleted the language files. And then the Content Languages were created.

I think these should all the time be created during installation if they don't already exist. What do you all mean?

avatar richard67
richard67 - comment - 1 Mar 2020

I think when you have this situation you can use "Discover" after a new installation to find the languages, and then install them with "Disvover" and not with Language Installation. Of course the discovery installation should then create the content languages. That would be the right way when doing a new install with previously being installed extensions or languages present on the file system and having to be installed again after the new CMS installation.

@astridx Would that work for you? I currently can't test and don't remember last time when I tested that. Can you check if discovery installation adds the content languages?

avatar brianteeman
brianteeman - comment - 1 Mar 2020

Discovery install does not create content language.

avatar astridx
astridx - comment - 1 Mar 2020

@brianteeman That is another reason not to make the creation of the content language dependent on existing files.

avatar infograf768
infograf768 - comment - 1 Mar 2020

This issue has been present since the creation of the Content Language has been automatically added to the installation of languages.

I am sure there is a solution to this by some modifications in the language adapter.
/libraries/src/Installer/Adapter/LanguageAdapter.php

@Bakual Any idea?

avatar brianteeman
brianteeman - comment - 1 Mar 2020

Installation is a package install
Discover is a language install

Probably points to where

avatar Bakual
Bakual - comment - 1 Mar 2020

I think it was done like this on purpose.
You only can create the content language automatically on the initial installation. When doing a discover or reinstall, you don't know if the content language has already beeen created or not. It may have also been deleted on purpose or whatever.

Of course it can be changed if someone wants to dig into it. You would have to check the #__languages table and see if the language code of the installed language is present in the lang_code column. If yes, content language exists. If not, create it.

avatar infograf768
infograf768 - comment - 1 Mar 2020

Of course it can be changed if someone wants to dig into it. You would have to check the #__languages table and see if the language code of the installed language is present in the lang_code column. If yes, content language exists. If not, create it.

I think it would be sensible to do that.

avatar brianteeman
brianteeman - comment - 5 Mar 2020

Closed by #28718

avatar brianteeman brianteeman - change - 5 Mar 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-03-05 09:03:43
Closed_By brianteeman
avatar brianteeman brianteeman - close - 5 Mar 2020
avatar astridx
astridx - comment - 5 Mar 2020

@brianteeman May I ask you what May I ask you what #28718 is?

avatar brianteeman
brianteeman - comment - 5 Mar 2020

sorry typo should have been #28178

avatar infograf768
infograf768 - comment - 5 Mar 2020

See #28176 (comment)

#28178 is unrelated.

avatar brianteeman
brianteeman - comment - 5 Mar 2020

If I misunderstood it can always be re-opened

avatar infograf768 infograf768 - change - 5 Mar 2020
Status Closed New
Closed_Date 2020-03-05 09:03:43
Closed_By brianteeman
avatar infograf768
infograf768 - comment - 5 Mar 2020

It has been explained that the OT issue is not a bug, but that we could improve as suggested by @Bakual
Therefore let’s indeed reopen if someone is interested to prpose a patch

avatar infograf768 infograf768 - reopen - 5 Mar 2020
avatar Bakual Bakual - change - 5 Mar 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-03-05 21:32:53
Closed_By Bakual
avatar Bakual
Bakual - comment - 5 Mar 2020

See #28243

avatar Bakual Bakual - close - 5 Mar 2020

Add a Comment

Login with GitHub to post a comment