Use InstallerModelLanguages to find an extension ID for the en-GB language
E.g.
$model = \JModelLegacy::getInstance('Languages', 'InstallerModel');
$model->findLanguages();
$items = $model->getItems();
the en-GB language is returned
0 items are returned
PHP 7.0 mySQL 5.5
Seems to be caused by a database change that isn't updated by the database migrations. Apparently language extensions are no longer of the type language but of the type package. And the element changed from 'en-GB' to 'pkg_en-GB'. It works fine on a fresh install.
Title |
|
Title |
|
There was a change with the en-GB language though if i remember correctly to make it a package see #9835
Indeed.
Why would it be fixed?
Why do you try to look for a language id through InstallerModelLanguages?
If the en-GB language is in the table with the above values it should work correctly. As it says in #9835 the en-GB language lacks the third db entry.
We use a CLI tool to deploy Joomla on our servers https://github.com/picturae/joomla-cli the install language part of it uses to retrieve the update id to request in this case the Dutch language pack from the correct update server.
Labels |
Added:
?
|
@danielsmink #9835 is already merged.
if you don't have the pkg_en-GB extension is because somehow your update didn't complete with success.
It did complete successfully. I think the issue is that the record in the DB isn't added upon upgrade (for the en-GB package). There are no pending database migrations. Re-installing the language might fix it as well I haven't tried that although I doubt it could be installed as it would use the same code I use for installing the Dutch language.
@danielsmink You most likely din't upgrade using com_joomlaupdate. Did you update using a CLI script and running database fix maybe?
That would be an unsupported upgrade path. The database fix doesn't apply the needed SQL changes (like the insert statement here: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/sql/updates/mysql/3.6.0-2016-04-08.sql) and thus you would miss the package entry.
@Bakual yep that's exactly how we do it using the same CLI tool previously mentioned. This has never been an issue with any prior upgrades. Or maybe not as apparent.
I guess we can fix it by running the SQL files in that directory. Thanks for the clarification I'll close the issue.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-07-13 12:40:27 |
Closed_By | ⇒ | danielsmink |
I confirm that if you extract the new files and use database fix then the entry in the extensions table:
English (en-GB) Language Pack
is not created and thus the Find languages screen (that depends on it) is empty
(e.g. my local git joomla repositories (which are several months old), did not list "available" languages , i had to run the query manually)
Or maybe not as apparent.
That one :)
The database fix never runs the insert (and I think delete) stuff. It just runs the SQL commands that alter the structure of the tables.
If you only use database fix, you will also miss the new installer plugins (install from folder/package/url).
Status | New | ⇒ | Information Required |
if i'm correct @mbabker sometime ago made a script to finish the upgrade process to solve those issues when upgrading manually. See https://gist.github.com/mbabker/d7bfb4e1e2fbc6b7815a733607f89281
Wowa thanks for that link @andrepereiradasilva :-) @mbabker is it ok to integrate this in our cli tool? I'll gladly mention it's yours. The tool itself is opensource.
Closing as this is a user error not a core joomla issue
Status | Information Required | ⇒ | Closed |
Closed_Date | 2016-07-13 12:40:27 | ⇒ | 2016-07-13 13:06:43 |
Closed_By | danielsmink | ⇒ | brianteeman |
The method already exists in 2.5...
It specifically fetches the update server to install/update language packs.
It is not designed for anything else.
No db change.
If you look at the _extensions table you will see that a specific language has 3 entries:
One for site, one for admin and one for the package.