? Information Required J4 Issue ?
avatar b2z
b2z
27 Nov 2018

So I am started to test my component on Joomla 4 ?

After installation I cannot access System section anymore because of the fatal error:
Argument 1 passed to Joomla\CMS\Schema\ChangeSet::getUpdateQueries() must be of the type array, boolean given, called in /var/www/nnt.ncj4/public_html/libraries/src/Schema/ChangeSet.php on line 74

Additionally I have a warning:
JFolder: :files: Path is not a folder. Path: /var/www/nnt.ncj4/public_html/administrator/components/com_competition/sql/updates/mysql

screen shot 2018-11-27 at 19 42 15

Seems that I need to put my update SQLs under /sql/updates/mysql folder, because currently they are under /sql/updates.

But the question is - should it lead to fatal error and block the access to System section?

avatar b2z b2z - open - 27 Nov 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Nov 2018
avatar mbabker
mbabker - comment - 27 Nov 2018

Oh the problems here are interesting...

Just looking at this bit of code tells me:

  1. Core is trying to enforce a file path for SQL files; such a standardization does not exist and it should not be assumed the folder's presence actually means update deltas exist here

  2. When parsing the XML manifest, the first <schemapath> element is used. This should retrieve the path for the correct database driver from the manifest. If whomever fixes this isn't copying the logic from Joomla\CMS\Installer\Installer::parseSchemaUpdates() (since core doesn't actually have a service layer for tasks like finding an extension's SQL schema files) then they're Doing It Wrong™.

  3. There's no check to say "hey, there isn't a directory here, we should abort the task", it's just assumed the directory will always exist.

  4. Likewise, the Joomla\CMS\Schema\ChangeSet class just arbitrarily assumes the folder it's being given actually exists and that the search for files will always return an array (ignoring it can have a boolean return if the filesystem API has an error)

avatar b2z
b2z - comment - 27 Nov 2018
  1. Yeap that was working fine on J3.
  2. Mine is looking like this now:
<install>
		<sql>
			<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
		</sql>
	</install>
	<uninstall>
		<sql>
			<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
		</sql>
	</uninstall>
	<update>
		<schemas>
			<schemapath type="mysql">sql/updates</schemapath>
		</schemas>
	</update>

3 and 4. Well :) There a lot of work should be done ;)


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

avatar C-Lodder
C-Lodder - comment - 21 Jan 2019

Having the same issue too.

Messing around with some code and will hopefully submit a worthy PR

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Mar 2019
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Mar 2019
Category Code style
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Apr 2019
Labels Added: ?
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 7 Apr 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 9 Apr 2019
Category Code style
avatar brianteeman
brianteeman - comment - 13 Dec 2019

Is this still an issue?

avatar b2z
b2z - comment - 13 Dec 2019

Well :) I will check later. Need to install fresh 4.0 to test.

avatar Quy Quy - change - 16 Dec 2019
Labels Added: Information Required
avatar Quy Quy - labeled - 16 Dec 2019
avatar Quy Quy - change - 4 Jan 2020
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2020-01-04 02:04:49
Closed_By Quy
avatar Quy
Quy - comment - 4 Jan 2020

Closing for now. You can comment here and we can re-open the issue.

avatar Quy Quy - close - 4 Jan 2020
avatar b2z
b2z - comment - 26 Jan 2020

I am back. No issue on the latest beta1-dev anymore

Add a Comment

Login with GitHub to post a comment