@nciske opened this Issue on January 25th 2021

I'm trying to invalidate the last week of archives so they can be re-run after some bulk updates.

I can get a single date to run just fine, but specifying multiple dates (per this FAQ) barfs out an invalid date error every time.

  • Matomo 4.1.1
  • PHP 7.4 on Ubuntu 20.x

Example from FAQ:
./console core:invalidate-report-data --dates=2012-01-01,2011-10-15 --sites=1,3,5

Works fine:
./console core:invalidate-report-data --sites=1,2 --dates=2021-01-25

Does not work fine:
./console core:invalidate-report-data --sites=1,2 --dates=2021-01-25,2021-01-24


Invalidating day periods in 2021-01-25,2021-01-24 [segment = ]...
Invalidating week periods in 2021-01-25,2021-01-24 [segment = ]...
Invalidating month periods in 2021-01-25,2021-01-24 [segment = ]...
Invalidating year periods in 2021-01-25,2021-01-24 [segment = ]...

ERROR [2021-01-25 21:11:36] 157296  Uncaught exception: /{matomo path}/public/core/Period/Range.php(155): Specified date range is invalid.

Specified date range is invalid.
  Specified date range is invalid.
@nciske commented on January 25th 2021

I've worked around this by putting each date in it's own line of a bash script, but I assume that is less performant than passing multiple dates in one go? Or not?

@tsteur commented on January 26th 2021 Member

does it work to flip the date @nciske ?

./console core:invalidate-report-data --sites=1,2 --dates=2021-01-24,2021-01-25
@nciske commented on January 27th 2021

It does work. Fascinating!

@tsteur commented on January 27th 2021 Member

👍 great, thanks for confirming. I'll adjust the example in the FAQ as it was wrong there. Thanks @nciske

This Issue was closed on January 27th 2021
Powered by GitHub Issue Mirror