?
avatar brianteeman
brianteeman
23 Sep 2019

installation\src\Model\DatabaseModel.php

There are two functions

protected function updateUserIds($db)

protected function updateDates($db)

The list of tables and fields here are incomplete and/or contains items that don't need to be checked

As far as I can tell there is no point in checking to update the date or id if there is no data installed in /joomla.sql for that table

From what I can see the lists were created for earlier version of joomla when sample data was installed and have not been updated

  • to remove items no longer in the installed data
  • to add items in the installed data
avatar brianteeman brianteeman - open - 23 Sep 2019
avatar joomla-cms-bot joomla-cms-bot - change - 23 Sep 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Sep 2019
avatar richard67
richard67 - comment - 23 Sep 2019

The date thing should become obsolete when our works on the datetime columns will be finished. I’ll put it on the task list which we have in Glip.

avatar brianteeman
brianteeman - comment - 23 Sep 2019

@richard67 that is unrelated

avatar richard67
richard67 - comment - 23 Sep 2019

@brianteeman. No, it is not. @wilsonge Please check and confirm.

avatar mbabker
mbabker - comment - 23 Sep 2019

It's unrelated. The updateDates function sets various dates to the current time (as of when that function runs) for a newly installed site. So instead of having a null date for your created date of the default uncategorised categories or your super user account's registration date, those are set to what is in essence the time the site was created. So the only thing it has to do with the rest of the work you're doing for the date/time fields is ensuring that query is correctly updated to match up with whatever the defaults in the joomla.sql file are.

avatar brianteeman
brianteeman - comment - 23 Sep 2019

So the only thing it has to do with the rest of the work you're doing for the date/time fields is ensuring that query is correctly updated to match up with whatever the defaults in the joomla.sql file are.

Not even that. The issue raised here is that there are fields/tables being checked with these functions that will never need to be checked and other fields/tables that should be checked with these functions which are not

avatar richard67
richard67 - comment - 23 Sep 2019

I see. Well, after my changes there will not be a null date anymore for created and modified columns, and for the others we will use real NULL values, so that function will need to be updated at least. Thanks toy Brian for opening this issue so I got aware of that.

avatar brianteeman
brianteeman - comment - 23 Sep 2019

You are still missing the point completely of this issue it is nothing to do with null dates - spend two seconds reading the code and you will see that.

avatar richard67
richard67 - comment - 23 Sep 2019

I see.

avatar brianteeman brianteeman - change - 24 Sep 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-09-24 10:42:53
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 24 Sep 2019

see #26399

avatar brianteeman brianteeman - close - 24 Sep 2019
avatar brianteeman
brianteeman - comment - 24 Sep 2019

re-open as although the current code is wrong it doesnt address the issue of localise or custom.sql

avatar brianteeman brianteeman - change - 24 Sep 2019
Status Closed New
Closed_Date 2019-09-24 10:42:53
Closed_By brianteeman
avatar brianteeman brianteeman - reopen - 24 Sep 2019
avatar richard67
richard67 - comment - 26 Oct 2019

@brianteeman Please test PR #26825 for the datetime part. The user ID part is handled with PR #26745 .

avatar brianteeman brianteeman - change - 5 Nov 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-11-05 22:13:28
Closed_By brianteeman
avatar brianteeman brianteeman - close - 5 Nov 2019

Add a Comment

Login with GitHub to post a comment