J4 Issue ?
avatar okdotnz
okdotnz
1 Jun 2020

Steps to reproduce the issue

Expected result

Show compatibility for Joomla Extensions / only display compatible extensions.
joomla_website

Actual result

Install from web not showing Joomla version compatibility for extensions.
backend_install_from_web

System information (as much as possible)

Additional comments

avatar okdotnz okdotnz - open - 1 Jun 2020
avatar joomla-cms-bot joomla-cms-bot - change - 1 Jun 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Jun 2020
avatar ReLater
ReLater - comment - 1 Jun 2020

Confirmed.
The reason is that the whole card HTML is fetched from outside via
https://appscdn.joomla.org/webapps/index.php?format=json&option=com_apps&view=dashboard
but the delivered data doesn't contain any compatibility informations.

I searched a while for someone to ping but have no idea if https://github.com/joomla/install-from-web-server is the right place. As far as I see a compatibility check is already present in the models... https://github.com/joomla/install-from-web-server/tree/master/components/com_apps/models

avatar mbabker
mbabker - comment - 1 Jun 2020

I searched a while for someone to ping but have no idea if https://github.com/joomla/install-from-web-server is the right place.

It is the right place. There is no need to "search for someone to ping" as it should be enough to log issues on the appropriate repositories and whomever is actively watching should respond in a timely manner (hint, right now I think it's still mostly me and we all know how hit and miss my availability is these days).

joomla/install-from-web-server@b319351 was done to extract the version compatibility info out of the JED, but incorporating it into the search filters was never done because I never took the time to reverse engineer the JED API endpoint to work out how to filter by compatible version, or add badges to the layout showing compatible versions. It looks like adding filter[versions]=(30|40) to the API calls might do the trick based on some very quick testing though if someone wants to work on a pull request adding either of the missing bits.

avatar jwaisner jwaisner - change - 1 Jun 2020
Status New Confirmed
Build staging 4.0-b2-dev
avatar joomla-cms-bot joomla-cms-bot - edited - 1 Jun 2020
avatar jwaisner jwaisner - change - 1 Jun 2020
Labels Added: J4 Issue
avatar jwaisner jwaisner - labeled - 1 Jun 2020
avatar toivo
toivo - comment - 1 Jul 2020

@mbabker @ReLater @Quy - This is a major UX issue. Joomla 4 should not list any extensions in the Install from Web tab by the plugin unless those extensions are tagged as J4 compatible. That is the long and short of it. Release blocker? Possibly.

avatar mbabker
mbabker - comment - 1 Jul 2020

An optional integration is not a release blocker.

Supposing my paid work doesn’t end in me working through the weekend, I will take time out of my schedule to finish the required updates for the install from web server since it seems no matter how many times I ask otherwise I am still somehow considered the “lead” on this system.

avatar toivo
toivo - comment - 1 Jul 2020

@mbabker Thanks, much appreciated. Hopefully you will have time to do that.

BTW, is the Install from Web tab going to be separate in the future, similar to 3.x, even if currently in Beta it is installed by default?

avatar mbabker
mbabker - comment - 1 Jul 2020

BTW, is the Install from Web tab going to be separate in the future, similar to 3.x, even if currently in Beta it is installed by default?

The plugin is integrated into and shipped with core in 4.0 (see #19319). It will continue to be an optional plugin for the remainder of 3.x.

avatar mbabker
mbabker - comment - 3 Jul 2020

Core needs this diff for the plugin to work with the new filter option:

diff --git a/build/media_source/plg_installer_webinstaller/js/client.es6.js b/build/media_source/plg_installer_webinstaller/js/client.es6.js
index 1ce543e8cc..6f0c6e6ac3 100644
--- a/build/media_source/plg_installer_webinstaller/js/client.es6.js
+++ b/build/media_source/plg_installer_webinstaller/js/client.es6.js
@@ -14,6 +14,7 @@ if (!Joomla) {
     view: 'dashboard',
     id: 0,
     ordering: '',
+    version: 'current',
     list: 0,
     options: Joomla.getOptions('plg_installer_webinstaller', {}),
   };
@@ -63,11 +64,19 @@ if (!Joomla) {
 
       let requestUrl = `${url}&product=${webInstallerOptions.options.product}&release=${webInstallerOptions.options.release}&dev_level=${webInstallerOptions.options.dev_level}&list=${webInstallerOptions.list ? 'list' : 'grid'}&lang=${webInstallerOptions.options.language}`;
 
-      if (webInstallerOptions.ordering !== '' && document.getElementById('com-apps-ordering').value) {
-        webInstallerOptions.ordering = document.getElementById('com-apps-ordering').value;
+      const orderingSelect = document.getElementById('com-apps-ordering');
+      const versionSelect = document.getElementById('com-apps-filter-joomla-version');
+
+      if (webInstallerOptions.ordering !== '' && orderingSelect && orderingSelect.value) {
+        webInstallerOptions.ordering = orderingSelect.value;
         requestUrl += `&ordering=${webInstallerOptions.ordering}`;
       }
 
+      if (webInstallerOptions.version !== '' && versionSelect && versionSelect.value) {
+        webInstallerOptions.version = versionSelect.value;
+        requestUrl += `&filter_version=${webInstallerOptions.version}`;
+      }
+
       WebInstaller.showLoadingLayer();
 
       new Promise((resolve, reject) => {
@@ -106,6 +115,7 @@ if (!Joomla) {
             });
 
             const orderingSelect = document.getElementById('com-apps-ordering');
+            const versionSelect = document.getElementById('com-apps-filter-joomla-version');
 
             if (orderingSelect) {
               orderingSelect.addEventListener('change', () => {
@@ -115,6 +125,14 @@ if (!Joomla) {
               });
             }
 
+            if (versionSelect) {
+              versionSelect.addEventListener('change', () => {
+                const index = versionSelect.selectedIndex;
+                webInstallerOptions.version = versionSelect.options[index].value;
+                this.installfromwebajaxsubmit();
+              });
+            }
+
             if (webInstallerOptions.options.installfrom_url !== '') {
               WebInstaller.installfromweb(webInstallerOptions.options.installfrom_url);
             }
@@ -233,14 +251,25 @@ if (!Joomla) {
         tail += `&filter_search=${value}`;
       }
 
-      if (webInstallerOptions.ordering !== '' && document.getElementById('com-apps-ordering').value) {
-        webInstallerOptions.ordering = document.getElementById('com-apps-ordering').value;
+      const orderingSelect = document.getElementById('com-apps-ordering');
+      const versionSelect = document.getElementById('com-apps-filter-joomla-version');
+
+      if (webInstallerOptions.ordering !== '' && orderingSelect && orderingSelect.value) {
+        webInstallerOptions.ordering = orderingSelect.value;
       }
 
       if (webInstallerOptions.ordering) {
         tail += `&ordering=${webInstallerOptions.ordering}`;
       }
 
+      if (webInstallerOptions.version !== '' && versionSelect && versionSelect.value) {
+        webInstallerOptions.version = versionSelect.value;
+      }
+
+      if (webInstallerOptions.version) {
+        tail += `&filter_version=${webInstallerOptions.version}`;
+      }
+
       this.loadweb(`${webInstallerOptions.options.base_url}index.php?format=json&option=com_apps${tail}`);
     }
 

(I don't have a functional workflow for submitting PRs so don't ask me to right now).

A similar change is needed in the standalone 3.x plugin, I am handling that.

All other changes are contained in the IFW server component.

avatar brianteeman
brianteeman - comment - 3 Jul 2020

can you post the diff as a file and I can do the pr

avatar mbabker
mbabker - comment - 3 Jul 2020

Attached ifw.diff.txt

avatar brianteeman
brianteeman - comment - 3 Jul 2020

'orderingSelect' is already declared in the upper scope.eslintno-shadow
'versionSelect' is already declared in the upper scope.eslintno-shadow

avatar mbabker
mbabker - comment - 3 Jul 2020

ifw_2.diff.txt

Apparently I made that change while I had nuked all my Node stuff and ESLint didn't say anything.

avatar brianteeman
brianteeman - comment - 3 Jul 2020

see #29938

avatar alikon alikon - change - 3 Jul 2020
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2020-07-03 19:16:28
Closed_By alikon
avatar alikon alikon - close - 3 Jul 2020
avatar alikon
alikon - comment - 3 Jul 2020

please test #29938

Add a Comment

Login with GitHub to post a comment