J3 Issue ?
avatar conflate-nl
conflate-nl
14 Sep 2017

Steps to reproduce the issue

In the extension manifest, in the install -> sql tag, add multiple file tags with sql scripts for parsing upon install. The first file specified, leave the contents of that file empty, then install the extension. Any files after that empty file aren't processed at all

Expected result

The next sql file is parsed, since an empty file can just be skipped, no need to abandon the whole parsing process

Actual result

The next sql files aren't processed

System information (as much as possible)

Joomla 3.7

Additional comments

Even when I put some comment line in the file, it still skipped the next files.

The cause seems to be in the file libraries/cms/installer/installer.php, on line 991 - 995. This checks if the file has any queries, and if none found, there is a 'return 0' on line 994, which breaks the entire process. This should be a 'continue', so the next file is parsed. Even if all the files come up empty, the variable $update_count is 0 anyway, so the end result of the function is still 0. So to fix this please change return 0; to continue; on line 994.

avatar conflate-nl conflate-nl - open - 14 Sep 2017
avatar joomla-cms-bot joomla-cms-bot - change - 14 Sep 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Sep 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 14 Sep 2017
Category com_installer
avatar franz-wohlkoenig franz-wohlkoenig - change - 14 Sep 2017
Priority Medium Urgent
avatar brianteeman
brianteeman - comment - 19 Sep 2017

Please submit a PR for testing with this change https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests

avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Sep 2017
Status New Discussion
avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar wilsonge wilsonge - change - 20 Jun 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-06-20 10:34:36
Closed_By wilsonge
avatar wilsonge wilsonge - close - 20 Jun 2018

Add a Comment

Login with GitHub to post a comment