J3 Issue ?
avatar brianteeman
brianteeman
29 May 2018

Steps to reproduce the issue

Install and enable the install from web plugin
Disable all other install plugins

Expected result

Only install from web tab is displayed for Extensions->install

Actual result

Message displayed

No installation plugin has been enabled. At least one must be enabled to be able to use the installer. Go to the Plugin Manager to enable the plugins.

chrome_2018-05-29_11-10-29

avatar brianteeman brianteeman - open - 29 May 2018
avatar joomla-cms-bot joomla-cms-bot - change - 29 May 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 29 May 2018
avatar mbabker
mbabker - comment - 29 May 2018

This is a major architectural fail.

When using the onInstallerViewBeforeFirstTab and onInstallerViewAfterLastTab events, plugins have to directly echo out the additional markup for the page. The IFW plugin doesn't return anything in these events, and isn't using the onInstallerAddInstallationTab event in the currently released version, so in this scenario the line that decides to show the error is basically checking a bunch of empty arrays.

To trick it into working there are two options:

  1. Make a dodgy fix in the IFW plugin to return some dummy data in the plugin events and tag a new release
  2. Finish up the improvements in the 4.0 branch, backport the work and tag a new release
avatar franz-wohlkoenig franz-wohlkoenig - change - 29 May 2018
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 29 May 2018
Category com_installer
avatar brianteeman
brianteeman - comment - 29 May 2018

yeah i just came to the same conclusion but thought of another option

Instead of trying to count the tabs why not count the number of enabled installer plugins

avatar mbabker
mbabker - comment - 29 May 2018

I don't know what else that plugin group is intended for, but not all of them may be adding tabs.

avatar brianteeman
brianteeman - comment - 29 May 2018

iirc that group was created by @roland-d just for managing what is displayed in the installer menu item. Before it was created they were all just one big file.

Doing a count of the enabled plugins is no more "hacky" than other solutions

avatar brianteeman brianteeman - change - 30 May 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 30 May 2018
avatar roland-d
roland-d - comment - 31 May 2018

Correct, I created the the plugin group for the installer plugins because non-existed. The IFW is the odd one out here since it works in a completely different way. We needed a plugin group as you otherwise can't enable/disable specific plugins. In my opinion the IFW should be reworked to use the plugin group as well, so all installation plugins work the same way.

As for the markup, I don't recall what was the issue but we had to do it that way. As far as I am concerned, we clean this up so all installer plugins work the same way.

avatar mbabker
mbabker - comment - 31 May 2018

All of that cleanup's already done in 4.0 via #19319 so really it's just left to which of the handful of hacky solutions is going to "best" address this particular issue until it can be done properly.

avatar roland-d
roland-d - comment - 31 May 2018

My vote goes to your option 2.

avatar mbabker
mbabker - comment - 31 May 2018

I'll add it to my calendar, currently I'm booked out through June 2021 ?

avatar roland-d
roland-d - comment - 31 May 2018

:D I have my German university students at the end of July. I can take it on as a project for them. Is that an option?

avatar mbabker
mbabker - comment - 31 May 2018

Everything's an option if there are resources to make it happen. It's honestly not a lot of effort to do the backport and new release, just a lack of time and having to re-prioritize all the things on my part for a while now.

avatar brianteeman
brianteeman - comment - 22 Jul 2018

@roland-d is this still something you are going to be looking at with the students?

avatar roland-d
roland-d - comment - 22 Jul 2018

@brianteeman Yes, I just arrived today and we are starting tomorrow with the students.

avatar brianteeman
brianteeman - comment - 22 Jul 2018

great stuff - I guessed that might be the case

avatar roland-d
roland-d - comment - 25 Jul 2018

We have some students working on this now.

I was looking at the J4 code, and I believe we can remove the onInstallerViewBeforeFirstTab and onInstallerViewAfterLastTab triggers because ordering is based on the plugin ordering. These triggers were only introduced because IFW was not a normal plugin.

avatar barbarosuntorunu
barbarosuntorunu - comment - 25 Jul 2018

public function onInstallerAddInstallationTab()
{
$tab = array();
$tab['name'] = 'url'; // $tab['name'] = 'web';
$tab['label'] = Text::('PLG_INSTALLER_URLINSTALLER_TEXT'); //$tab['label'] = Text::('PLG_INSTALLER_WEBINSTALLER');

	ob_start();
	include PluginHelper::getLayoutPath('installer', 'urlinstaller');  //include PluginHelper::getLayoutPath('installer', 'webinstaller');
	$tab['content'] = ob_get_clean();
	return $tab;
}

}
maybe adding this in webinstaller.php can be help.
or just adding this empty method;

public function onInstallerAddInstallationTab()
{
return ['asd'];
}
@icampus

avatar brianteeman
brianteeman - comment - 25 Jul 2018

@roland-d agree

avatar joomla-cms-bot joomla-cms-bot - change - 25 Jul 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-07-25 11:12:51
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 25 Jul 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jul 2018
Closed_By joomla-cms-bot franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 25 Jul 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Jul 2018

closed as having Pull Request #21255

Add a Comment

Login with GitHub to post a comment