?
avatar vistiyos
vistiyos
5 Jun 2017

Steps to reproduce the issue

One of our extensions is using install method from InstallerModelLanguages class (administrator/components/com_installer/models/languages.php).

It seems you have removed several methods of that class in Joomla! 3.7, so my extension is now broken because of this. Is there any reason of doing this? Where you have place this method? Have you alerted to this issue?

Here is the code of that method: https://github.com/joomla/joomla-cms/blob/3.6.3/administrator/components/com_installer/models/languages.php#L253 but it's not there anymore.

Expected result

Having that method in place

Actual result

Fatal error: Call to undefined method InstallerModelLanguages::install()

System information (as much as possible)

Ubuntu 16.04 x64
Nginx 1.10
PHP FPM
PHP 5.4.45, 5.5.37, 5.6.23, 7.0.8, 7.1.0

Aditional comments

The new code has not been implemented properly as the model is getting data from the request, but on a MVC approach, this task should be done by the controller and pass those parameters to the model.

avatar vistiyos vistiyos - open - 5 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jun 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Jun 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Jun 2017
Category com_installer
avatar vistiyos vistiyos - change - 5 Jun 2017
The description was changed
avatar vistiyos vistiyos - edited - 5 Jun 2017
avatar tonypartridge
tonypartridge - comment - 5 Jun 2017

@Bakual removed this class in this pull:
#13256

avatar Bakual
Bakual - comment - 5 Jun 2017

Technically there is no B/C promise for code in components. Only the library is covered.

Why are you needing this in your extension? Are you trying to install core language packs from within your extension?
As you see, the install language view now doesn't use the database at all (there is no reason for it). It directly fetches the needed data from the updateserver XML and uses the regular install_url controller task from the installer to install the package.

The new code has not been implemented properly as the model is getting data from the request, but on a MVC approach, this task should be done by the controller and pass those parameters to the model.

While that is true for a "proper" MVC structure, we never followed that in Joomla. The model currently always is dealing with request stuff (look at the populateState method).

avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Jun 2017
Status New Discussion
avatar aDaneInSpain
aDaneInSpain - comment - 6 Jun 2017

Yes, we are trying to install core language packs using the extension. http://www.neno-translate.com

avatar Bakual
Bakual - comment - 6 Jun 2017

I see.
Since we don't store the possible languages anymore in the database, you can't use that language install method anymore anyway, even if the code would still be there.
You need to trigger the install task in the install controller and pass it the package URL in the install_url field.

avatar brianteeman brianteeman - change - 18 Aug 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-08-18 19:39:54
Closed_By brianteeman
avatar brianteeman brianteeman - close - 18 Aug 2017
avatar brianteeman
brianteeman - comment - 18 Aug 2017

It has been several months since this issue was created. I am closing it at this time based on the comments above but it can always be reopened

Add a Comment

Login with GitHub to post a comment