Feature Language Change bug PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
7 Oct 2023

Summary of Changes

Check database version before update

Testing Instructions

set update Minimum Stability to RC
Go to update page,
In overview there will be a new Row about DB Version.

Screenshot 2023-10-07_14-01-08

Then, edit

$dbMin = $this->getTargetMinimumDatabaseVersion($dbType);

Change to $dbMin = '9.0.0';

And open the update page again.
The row with database version should show "No" in "Checked" column

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed
avatar Fedik Fedik - open - 7 Oct 2023
avatar Fedik Fedik - change - 7 Oct 2023
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Oct 2023
Category Administration com_joomlaupdate Language & Strings
avatar Fedik Fedik - change - 7 Oct 2023
Labels Added: Feature Language Change bug PR-4.4-dev
avatar Fedik Fedik - change - 7 Oct 2023
The description was changed
avatar Fedik Fedik - edited - 7 Oct 2023
avatar brianteeman
brianteeman - comment - 7 Oct 2023

This is not correct. See my comments about php

avatar Fedik
Fedik - comment - 7 Oct 2023

I don't really understood your comments there,
It shows No in "Checked" column, if something is wrong, that is good enough to me.

Maybe it is missing a link to "System requirement", but that should be in general description then.

Well, I understood now ?
But this PR does not fix that, it just add a new point to the compatibility check list.

avatar Fedik
Fedik - comment - 7 Oct 2023

Okay, I close it,
For now it is usless, because user do not get to this page when DB is unsuported

if (isset($this->currentUpdate->supported_databases)) {
$db = Factory::getDbo();
$dbType = strtolower($db->getServerType());
$dbVersion = $db->getVersion();
$supportedDbs = $this->currentUpdate->supported_databases;
// MySQL and MariaDB use the same database driver but not the same version numbers
if ($dbType === 'mysql') {
// Check whether we have a MariaDB version string and extract the proper version from it
if (stripos($dbVersion, 'mariadb') !== false) {
// MariaDB: Strip off any leading '5.5.5-', if present
$dbVersion = preg_replace('/^5\.5\.5-/', '', $dbVersion);
$dbType = 'mariadb';
}
}
// Do we have an entry for the database?
if (isset($supportedDbs->$dbType)) {
$minimumVersion = $supportedDbs->$dbType;
$dbMatch = version_compare($dbVersion, $minimumVersion, '>=');
}
} else {
// Set to true if the <supported_databases> tag is not set
$dbMatch = true;
}

avatar Fedik Fedik - change - 7 Oct 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-10-07 12:45:26
Closed_By Fedik
avatar Fedik Fedik - close - 7 Oct 2023
avatar brianteeman
brianteeman - comment - 7 Oct 2023

Glad you now see the problem even if you cant fix it.

Add a Comment

Login with GitHub to post a comment