Skip to content

Critical error during database upgrade "The date '-0001-11-30' is a date before first website was online" when updating to 4.2.0 #17253

@aldafu

Description

@aldafu

The database upgrade fails when trying to update Matomo from 4.1.1 to 4.2.0 with the following error.

$ sudo -u www-data php /var/www/html/console core:update 
...
   *** Update ***

    Database Upgrade Required

    Your Matomo database is out-of-date, and must be upgraded before you can continue.

    Matomo database will be upgraded from version 4.1.1 to the new version 4.2.0.

    The database upgrade process may take a while, so please be patient.

  Executing ... DEBUG [2021-02-23 15:46:57] 25510  General tracker cache was re-created.
DEBUG [2021-02-23 15:46:57] 25510  General tracker cache was re-created.

    [X] Critical Error during the update process:

    * /var/www/html/core/Updates/4.1.2-b1.php:
    Error trying to execute the migration ''.
    The error was: The date '-0001-11-30' is a date before first website was online. Try date that's after Aug 6, 1991 (timestamp 681436800).: -62169984000

Expected Behavior

Running the database upgrade script should finish successfully or provide manual steps on how to make it run successfully.

Current Behavior

Database upgrade fails and leaves Matomo in an unusable state.

Steps to Reproduce (for Bugs)

  1. Initiate auto update for Matomo to update to 4.2.0
  2. Start database upgrade (either through browser or shell console)

Your Environment

  • Matomo Version: currently 4.1.1
  • PHP Version: PHP 7.2.24-0ubuntu0.18.04.7 (cli) (built: Oct 7 2020 15:24:25) ( NTS )
  • Server Operating System: Ubuntu 18.04.5 LTS
  • Additionally installed plugins: See https://pastebin.com/9steqyyE
  • full log from running the upgrade script: https://pastebin.com/W9AfgXSG

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFor errors / faults / flaws / inconsistencies etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions