?
avatar svenbluege
svenbluege
8 Aug 2017

Steps to reproduce the issue

  1. start the web install process
  2. before removing the install folder click the "Extra Step: Install Languages" button
  3. select a language from the list
  4. click "next"

Expected result

  • a loading spinner appears
  • the loading spinner disappears but I'm in the second tab

Actual result

  • a loading spinner appears
  • the loading spinner disappears but I'm not in the second tab

System information (as much as possible)

Joomla 3.8.0-Dev

screen shot 2017-08-08 at 19 56 06

Additional comments

I encountered this issue while trying to install Joomla 3.8 with the JoomlaBrowser
https://github.com/joomla-projects/joomla-browser

The following error is visible in the browser if you click the "next" button a second time:

image

avatar svenbluege svenbluege - open - 8 Aug 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Aug 2017
avatar mbabker
mbabker - comment - 8 Aug 2017

Can you check the browser's dev console to see if the network request is having any errors or if there's a JavaScript related issue?

avatar svenbluege svenbluege - change - 8 Aug 2017
The description was changed
avatar svenbluege svenbluege - edited - 8 Aug 2017
avatar svenbluege
svenbluege - comment - 8 Aug 2017

Sure. I added the screenshot to the initial post.

avatar franz-wohlkoenig franz-wohlkoenig - change - 9 Aug 2017
Status New Discussion
avatar svenbluege
svenbluege - comment - 9 Aug 2017

Just an addition. I checked the server return. My server had the error level pretty high so I see some notices which break the JSON response:

Notice: Undefined property: stdClass::$min_dev_level in /var/www/eventgallery/tests/joomla-cms3/libraries/src/Updater/Update.php on line 326
Call Stack
#	Time	Memory	Function	Location
1	0.2007	385760	{main}( )	.../index.php:0
2	0.2086	1077992	InstallationApplicationWeb->execute( )	.../index.php:32
3	0.2086	1077992	InstallationApplicationWeb->doExecute( )	.../CMSApplication.php:267
4	0.2092	1097856	InstallationApplicationWeb->dispatch( )	.../web.php:200
5	0.2118	1266008	InstallationControllerInstallLanguages->execute( )	.../web.php:161
6	0.2144	1278080	InstallationModelLanguages->install( )	.../languages.php:61
7	0.2196	1436200	InstallationModelLanguages->getPackageUrl( )	.../languages.php:164
8	0.2227	1441848	Joomla\CMS\Updater\Update->loadFromXml( )	.../languages.php:237
9	0.7021	1448488	xml_parse ( )	.../Update.php:483
10	0.7025	1453656	Joomla\CMS\Updater\Update->_endElement( )	.../Update.php:483

( ! ) Notice: Undefined property: stdClass::$max_dev_level in /var/www/eventgallery/tests/joomla-cms3/libraries/src/Updater/Update.php on line 327
Call Stack
#	Time	Memory	Function	Location
1	0.2007	385760	{main}( )	.../index.php:0
2	0.2086	1077992	InstallationApplicationWeb->execute( )	.../index.php:32
3	0.2086	1077992	InstallationApplicationWeb->doExecute( )	.../CMSApplication.php:267
4	0.2092	1097856	InstallationApplicationWeb->dispatch( )	.../web.php:200
5	0.2118	1266008	InstallationControllerInstallLanguages->execute( )	.../web.php:161
6	0.2144	1278080	InstallationModelLanguages->install( )	.../languages.php:61
7	0.2196	1436200	InstallationModelLanguages->getPackageUrl( )	.../languages.php:164
8	0.2227	1441848	Joomla\CMS\Updater\Update->loadFromXml( )	.../languages.php:237
9	0.7021	1448488	xml_parse ( )	.../Update.php:483
10	0.7025	1453656	Joomla\CMS\Updater\Update->_endElement( )	.../Update.php:483

Seems like this code is causing the notice messages:

	$patchMinimumSupported = $this->get('jversion.dev_level', Version::PATCH_VERSION) >= $this->currentUpdate->targetplatform->min_dev_level;
				$patchMaximumSupported = $this->get('jversion.dev_level', Version::PATCH_VERSION) <= $this->currentUpdate->targetplatform->max_dev_level;

```<hr /><sub>This comment was created with the <a href="https://github.com/joomla/jissues">J!Tracker Application</a> at <a href="https://issues.joomla.org/tracker/joomla-cms/17452">issues.joomla.org/tracker/joomla-cms/17452</a>.</sub>
avatar svenbluege
svenbluege - comment - 9 Aug 2017

@mbabker I guess this commit causes the issue: wilsonge/joomla-cms@e130087

Hope this helps. Seems like this is actually unrelated to the multilanguage category.

avatar mbabker
mbabker - comment - 9 Aug 2017

Ya, the isset checks from the block below the $patchMinimumSupported variable needs to be added to that line (same for the max).

avatar richard67
richard67 - comment - 9 Aug 2017

I can confirm that there are PHP notices shown on a 3.7.4 updated to 3.8.0-beta in the Joomla Update view on "Undefined property: stdClass::$min_dev_level" and other stuff related to the change of the version number variables. So there seems to be something wrong with that on updated systems but as it looks like it does not happen on clean staging installation.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17452.

avatar mbabker
mbabker - comment - 9 Aug 2017

The old constants are still present so that in and of itself is not an issue.

The issue is when processing update XML files that do not have min_dev_level and max_dev_level attributes on the targetplatform tag, the isset check needs to be moved up to be included in the $patch* variables.

$patchMinimumSupported = !isset($this->currentUpdate->targetplatform->min_dev_level) || Version::PATCH_VERSION >= $this->currentUpdate->targetplatform->min_dev_level
avatar infograf768
infograf768 - comment - 10 Aug 2017

Just found that too in 3.8.0 beta
#17462
It happens on clean staging install here.

avatar infograf768
infograf768 - comment - 10 Aug 2017

Based on @mbabker suggestion, I tested this patch and do not get errors anymore:

diff --git a/libraries/src/Updater/Adapter/ExtensionAdapter.php b/libraries/src/Updater/Adapter/ExtensionAdapter.php
index 63e3043..b6d645e 100644
--- a/libraries/src/Updater/Adapter/ExtensionAdapter.php
+++ b/libraries/src/Updater/Adapter/ExtensionAdapter.php
@@ -125,11 +125,11 @@
 				 * Check for optional min_dev_level and max_dev_level attributes to further specify targetplatform (e.g., 3.0.1)
 				 */
-				$patchMinimumSupported = Version::PATCH_VERSION >= $this->currentUpdate->targetplatform->min_dev_level;
-				$patchMaximumSupported = Version::PATCH_VERSION <= $this->currentUpdate->targetplatform->max_dev_level;
+				$patchMinimumSupported = !isset($this->currentUpdate->targetplatform->min_dev_level) || Version::PATCH_VERSION >= $this->currentUpdate->targetplatform->min_dev_level;
+				$patchMaximumSupported = !isset($this->currentUpdate->targetplatform->max_dev_level) || Version::PATCH_VERSION >= $this->currentUpdate->targetplatform->max_dev_level;
 
 				if ($product == $this->currentUpdate->targetplatform['NAME']
 					&& preg_match('/^' . $this->currentUpdate->targetplatform['VERSION'] . '/', JVERSION)
-					&& ((!isset($this->currentUpdate->targetplatform->min_dev_level)) || $patchMinimumSupported)
-					&& ((!isset($this->currentUpdate->targetplatform->max_dev_level)) || $patchMaximumSupported))
+					&& $patchMinimumSupported
+					&& $patchMaximumSupported)
 				{
 					// Check if PHP version supported via <php_minimum> tag, assume true if tag isn't present
diff --git a/libraries/src/Updater/Update.php b/libraries/src/Updater/Update.php
index 5a3dfb0..d342f84 100644
--- a/libraries/src/Updater/Update.php
+++ b/libraries/src/Updater/Update.php
@@ -324,12 +324,12 @@
 				 * Check for optional min_dev_level and max_dev_level attributes to further specify targetplatform (e.g., 3.0.1)
 				 */
-				$patchMinimumSupported = $this->get('jversion.dev_level', Version::PATCH_VERSION) >= $this->currentUpdate->targetplatform->min_dev_level;
-				$patchMaximumSupported = $this->get('jversion.dev_level', Version::PATCH_VERSION) <= $this->currentUpdate->targetplatform->max_dev_level;
+				$patchMinimumSupported = !isset($this->currentUpdate->targetplatform->min_dev_level) || Version::PATCH_VERSION >= $this->currentUpdate->targetplatform->min_dev_level;
+				$patchMaximumSupported = !isset($this->currentUpdate->targetplatform->max_dev_level) || Version::PATCH_VERSION >= $this->currentUpdate->targetplatform->max_dev_level;
 
 				if (isset($this->currentUpdate->targetplatform->name)
 					&& $product == $this->currentUpdate->targetplatform->name
 					&& preg_match('/^' . $this->currentUpdate->targetplatform->version . '/', $this->get('jversion.full', JVERSION))
-					&& ((!isset($this->currentUpdate->targetplatform->min_dev_level)) || $patchMinimumSupported)
-					&& ((!isset($this->currentUpdate->targetplatform->max_dev_level)) || $patchMaximumSupported))
+					&& $patchMinimumSupported
+					&& $patchMaximumSupported)
 				{
 					$phpMatch = false;

avatar infograf768
infograf768 - comment - 10 Aug 2017

@mbabker
Can you make the patch or shall I (if this above looks OK to you) ?

avatar mbabker
mbabker - comment - 10 Aug 2017

Would you do the patch please?

avatar infograf768
infograf768 - comment - 10 Aug 2017

will do tmorrow

avatar richard67
richard67 - comment - 10 Aug 2017

Just ping me when the PR is ready so I can help with testing.

avatar infograf768
infograf768 - comment - 11 Aug 2017
avatar infograf768 infograf768 - change - 11 Aug 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-08-11 06:42:43
Closed_By infograf768
avatar infograf768 infograf768 - close - 11 Aug 2017

Add a Comment

Login with GitHub to post a comment