? Success

User tests: Successful: Unsuccessful:

avatar demis-palma
demis-palma
23 Mar 2015

Description

Immediately after checking the existance of a file, in case the file doesn't exist, the error mesage JLIB_INSTALLER_ERROR_SQL_ERROR is shown, while it should be JLIB_INSTALLER_ERROR_SQL_FILENOTFOUND

How to reproduce

Use any component which makes use of SQL statements after its installation.
Edit the xml descriptor of the installation package
<extension type="component" version="3.0" method="upgrade">
...

There search and remove the sql section
<folder>sql</folder>

but take care to keep the following section
<install>
<sql><file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file></sql>
</install>

Doing this way, the sql directory won't be copied from the installation package to the destination folder.
Proceed installing the component
All the extension files will be copied to the destination folder, except for the sql directory.
At this point Joomla will try to run the sql statements from the destination folder, but the file does not exist, and the following message will be displayed:

Warning - JInstaller: :Install: Error SQL DB function reports no errors.

The error message used has been probably blindly copied from 30 lines below, where it is actually used in response to ($db->execute) failure.

After applying the proposed patch, the error message becomes:

Warning - JInstaller: :Install: SQL File not found /.../component-dir/sql/install.mysql.utf8.sql

In addition, the string id JLIB_INSTALLER_ERROR_SQL_FILENOTFOUND is not used anywhere else in the project, which confirms that it must had been created to be used here.

avatar demis-palma demis-palma - open - 23 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 23 Mar 2015
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 23 Mar 2015
Labels Added: ?
avatar wilsonge
wilsonge - assign - 25 Mar 2015
Assigned to mbabker
avatar wilsonge wilsonge - unassigned - 25 Mar 15
avatar mbabker
mbabker - assign - 25 Mar 2015
Assigned to mbabker
avatar zero-24 zero-24 - change - 27 Mar 2015
Category Language & Strings Libraries
avatar OctavianC
OctavianC - comment - 29 Apr 2015

Just tested this and behaves properly.

  • Error message before: JInstaller: :Install: Error SQL DB function reports no errors.
  • After patch: JInstaller: :Install: SQL File not found D:\xampp\htdocs\test\administrator\components\com_rsticketspro/sql/test.sql

I've just discovered the bug, tried to create a pull request but noticed that it has already been reported and a fix proposed. Why isn't this RTC? :)

avatar mbabker
mbabker - comment - 29 Apr 2015

A lack of testing basically. Usually items aren't merged without two good tests.

avatar zero-24 zero-24 - alter_testresult - 29 Apr 2015 - OctavianC: Tested successfully
avatar joomla-cms-bot joomla-cms-bot - change - 2 May 2015
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 2 May 2015
Labels Added: ?
avatar demis-palma
demis-palma - comment - 2 May 2015

This PR has just been labelled "Language Change" by joomla-cms-bot, but it does not require any language change, since it uses strings already present.

avatar brianteeman
brianteeman - comment - 2 May 2015

That's because the pull request removes two strings

avatar brianteeman
brianteeman - comment - 2 May 2015

I know it seems daft but we normally do not remove strings from the core in case extensions are using them.

avatar demis-palma
demis-palma - comment - 2 May 2015

Thanks Brian, the string removal belongs to a different fix which I can't send because I forgot to switch to a different branch.
PR restored to the original state: no string removal involved.

avatar zero-24 zero-24 - change - 2 May 2015
Labels Removed: ?
avatar zero-24 zero-24 - change - 2 May 2015
Labels Removed: ?
avatar zero-24
zero-24 - comment - 2 May 2015

PR restored to the original state: no string removal involved.

label removed thanks :smile:

avatar wilsonge wilsonge - change - 2 May 2015
Milestone Added:
avatar bertmert
bertmert - comment - 6 May 2015

@test Success.

Tested with com_joomgallery_3_1_1_stable
Before:

Warning
JInstaller: :Install: Error SQL DB function reports no errors.
Extension Install: SQL error processing query: DB function reports no errors.

After:

Warning
JInstaller: :Install: SQL File not found /path/to/joomla/administrator/components/com_joomgallery/sql/install.mysql.utf8.sql
Extension Install: SQL error processing query: DB function reports no errors.
avatar zero-24 zero-24 - alter_testresult - 7 May 2015 - bertmert: Tested successfully
avatar zero-24 zero-24 - change - 7 May 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 7 May 2015

As @demis-palma reverted all changes since the test by @OctavianC and we get a seccond successful test by @bertmert i set this here to RTC. Thanks for testing and coding :+1:


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

avatar zero-24 zero-24 - change - 7 May 2015
Milestone Removed:
Labels Added: ?
avatar zero-24 zero-24 - close - 25 May 2015
avatar wilsonge wilsonge - change - 25 May 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-05-25 00:24:10
Closed_By wilsonge
avatar wilsonge wilsonge - close - 25 May 2015
avatar wilsonge
wilsonge - comment - 25 May 2015

Merged into staging - thanks!

avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment