-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Wrong error message #6559
Conversation
Just tested this and behaves properly.
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? :) |
A lack of testing basically. Usually items aren't merged without two good tests. |
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. |
That's because the pull request removes two strings |
I know it seems daft but we normally do not remove strings from the core in case extensions are using them. |
Thanks Brian, the string removal belongs to a different fix which I can't send because I forgot to switch to a different branch. |
label removed thanks 😄 |
@test Success. Tested with com_joomgallery_3_1_1_stable
After:
|
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. |
Merged into staging - thanks! |
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.