? ? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
14 Mar 2020

Pull Request for Issue #27924 .

Summary of Changes

This PR adds handling of exceptions which are thrown by the installation's database model in routine createDatabase but never were caught and handled so that e.g. the bad connfiguration file after a bad attemt to create the database was not deleted.

Testing Instructions

Requirements

  1. A database which fulfills the minimum server version requirements as they are
  • MySql: 5.6
  • MariaDB: 10.1
  • PostgreSQL: 11.0
  1. A database user who doesn not have the privilege to create a new database on that server with that kind of connection.
  2. An existing, empty database suitable for a new Joomla installation for which the user mentioned in condition 2 does have all privileges needed for Joomla installation, e.g. create tables, or alternatively another database user who has the permission to create new databases.

Instructions

Step 1: Start a new installation of a current 4.0-dev without the patch of this PR applied.

Step 2: When coming to the database information, enter a valid server and a valid user name and password for a user who doesn't have the privilege to create databases. Enter a database name for which no database exists. When having filled out all fields, use the "Install Joomla >" button to start the installation.

Result: Depending on the particular database driver you see a more or less meaningful error message.

Step 3: Correct the database name so it fits to an existing database for which the previously entered user has all privileges required for a Joomla installation, or alternatively change user to one who has the privilege to create a new database. Then use the "Install Joomla >" button again.

Result: For MySQLi and MySQL (PDO): See section "Actual result" below. For PostgreSQL (PDO). it might be like described in section "Expected result".

Step 4: Repeat steps 1 to 3 but this time with the patch of thos PR applied.

Result: See section "Expected result" below.

Expected result

When entering a not existing database as database name in the installation form and a user who doesn't have the permission to create a database, you can correct database or user information after the error message and then continue with the installation by using again the "Install Joomla >" button.

Actual result

When entering a not existing database as database name in the installation form and a user who doesn't have the permission to create a database, and then after the error message correct database or user information and start the installation again, it stops with an unspecified database error, at least when using MySQLi or MySQL (PDO). For PostgreSQL the error could not be reproduced before..
j4-installation-tweaks-1_3

Documentation Changes Required

None.

avatar richard67 richard67 - open - 14 Mar 2020
avatar richard67 richard67 - change - 14 Mar 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Mar 2020
Category Installation
avatar richard67
richard67 - comment - 14 Mar 2020

Added release blocker label as inherited from issue #27924 .

avatar richard67 richard67 - change - 14 Mar 2020
Labels Added: ? ?
avatar richard67 richard67 - change - 14 Mar 2020
The description was changed
avatar richard67 richard67 - edited - 14 Mar 2020
avatar richard67 richard67 - change - 14 Mar 2020
The description was changed
avatar richard67 richard67 - edited - 14 Mar 2020
avatar richard67
richard67 - comment - 14 Mar 2020

Thanks @wilsonge .

avatar jwaisner
jwaisner - comment - 17 Mar 2020

I have tested this item successfully on e47670e

Tested successful with MySQLi


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

avatar jwaisner jwaisner - test_item - 17 Mar 2020 - Tested successfully
avatar Quy
Quy - comment - 17 Mar 2020

I have tested this item successfully on e47670e


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

avatar Quy Quy - test_item - 17 Mar 2020 - Tested successfully
avatar Quy Quy - change - 17 Mar 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 17 Mar 2020

RTC


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

avatar wilsonge wilsonge - change - 17 Mar 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-03-17 16:15:45
Closed_By wilsonge
Labels Added: ?
avatar wilsonge
wilsonge - comment - 17 Mar 2020

Thanks!

avatar richard67
richard67 - comment - 17 Mar 2020

Thanks, too.

Add a Comment

Login with GitHub to post a comment