Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong error message #6559

Closed
wants to merge 3 commits into from
Closed

Wrong error message #6559

wants to merge 3 commits into from

Conversation

demis-palma
Copy link
Contributor

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.

@OctavianC
Copy link
Contributor

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? :)

@mbabker
Copy link
Contributor

mbabker commented Apr 29, 2015

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

@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label May 2, 2015
@demis-palma
Copy link
Contributor Author

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.

@brianteeman
Copy link
Contributor

That's because the pull request removes two strings

@brianteeman
Copy link
Contributor

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

@demis-palma
Copy link
Contributor Author

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.

@zero-24 zero-24 removed the Language Change This is for Translators label May 2, 2015
@zero-24
Copy link
Contributor

zero-24 commented May 2, 2015

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

label removed thanks 😄

@wilsonge wilsonge added this to the Joomla! 3.4.2 milestone May 2, 2015
@ghost
Copy link

ghost commented May 6, 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.

@zero-24
Copy link
Contributor

zero-24 commented May 7, 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 👍


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

@zero-24 zero-24 added the RTC This Pull Request is Ready To Commit label May 7, 2015
@wilsonge wilsonge closed this in 6d09d47 May 25, 2015
@wilsonge
Copy link
Contributor

Merged into staging - thanks!

johanjanssens pushed a commit to joomlatools/joomla-fork that referenced this pull request Jun 19, 2015
@zero-24 zero-24 removed the RTC This Pull Request is Ready To Commit label Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants