@AltamashShaikh opened this Issue on October 20th 2022 Contributor

When setting archiving_custom_ranges='date1,date2' the archive doesn't seems to execute for plugins.

Expected Behavior

The archiving_custom_ranges should work for plugins too

Current Behavior

archiving_custom_ranges only works for Core it seems, for instance if we take a CustomReports and run core:archive we can see there are no archive for that date range in the database.

Possible Solution

Steps to Reproduce (for Bugs)

  1. Added following entry in global.ini.phpfile
    archiving_custom_ranges[] = '2022-10-02,2022-10-07'
  2. Confirmed that we have any Date Range reports for testing range:
    Select * from matomo_archive_numeric_2022_10 where date1 like '2022-10-02' and date2 like '2022-10-07';
  3. Run core:archive to check if custom ranges are processed
    INFO [2022-10-04 22:34:58] 2135416  Archived website id 1, period = range, date = 2022-10-02,2022-10-07, segment = '', 0 
    visits found. Time elapsed: 0.774s
    INFO [2022-10-04 22:34:59] 2135416  Archived website id 1, period = range, date = 2022-10-02,2022-10-07, segment = 
    'visitIp!=10.10.36.79', 0 visits found. Time elapsed: 0.775s
  4. Checked the database to see what Date Ranges existed after the pre-processed period for this range should have been processed:
    |    145724 | done                                               |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:58 |     1 |
    |    145725 | done90a5a511e1974bca37613b6daec137ba.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:57 |     1 |
    |    145726 | done90a5a511e1974bca37613b6daec137ba.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:57 |     1 |
    |    145727 | donefea44bece172bc9696ae57c26888bf8a.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:57 |     1 |
    |    145728 | donefea44bece172bc9696ae57c26888bf8a.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:58 |     1 |
    |    145729 | donec276dccc46ea23c1bffdd046127f41d6.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:58 |     1 |
    |    145734 | donec276dccc46ea23c1bffdd046127f41d6.UserCountry   |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:58 |     1 |
    |    145735 | donee6905cbc8b89c83e29361cf7bda35da5               |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145736 | doneda3da2b521cb60a5498bc76ca8908427               |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145737 | done3c6cd97084beb5acf44c03c8c2d90240               |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145738 | done9060f74fc26e589ccdda46a95c5e03f4.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145739 | done9060f74fc26e589ccdda46a95c5e03f4.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145740 | donea0b1936514058d4605ec4a779a145a3f.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145741 | done974503358e6677e1189e840c70fe0485.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145742 | donea0b1936514058d4605ec4a779a145a3f.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145743 | done974503358e6677e1189e840c70fe0485.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145744 | done3fa7c745cc2022d9fd76c26621f01d68.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145745 | done4e98c9e9f2e9acd58778cf76f1974ccc.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145746 | done67b7226df97e185f109dac24a1b8bb4b.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145747 | done4e98c9e9f2e9acd58778cf76f1974ccc.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145748 | done3fa7c745cc2022d9fd76c26621f01d68.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145749 | done67b7226df97e185f109dac24a1b8bb4b.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145750 | doneb10ef3cd4a9f71a8c1ca91a701354239.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145752 | doneb618b3f37cde9bbb8567c385db3a5fe9.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145757 | donea6c891a89d90b0dc8c73ae1210a6161c.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145761 | doneb618b3f37cde9bbb8567c385db3a5fe9.UserCountry   |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145763 | doneb10ef3cd4a9f71a8c1ca91a701354239.UserCountry   |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145766 | donea6c891a89d90b0dc8c73ae1210a6161c.UserCountry   |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:34:59 |     1 |
    |    145767 | done7421bc0a2d0b9e2b72c79311effba367               |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145768 | done488bbbed86b6bd42225560c9bf2f8140               |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145769 | donef7b04a6b09298823c6d13816e54e4030               |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145770 | doned8e75c1a4119dce20db92d65c47c3316.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145771 | doned8e75c1a4119dce20db92d65c47c3316.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145772 | donef5b862d77f6bc48480eaea873febef16.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145773 | donef5b862d77f6bc48480eaea873febef16.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145774 | donefbe1597477210cd3de413a3819aae1df.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145775 | donefbe1597477210cd3de413a3819aae1df.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145776 | doneb2e0a353c0fffe422045f1854aab4d22.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145777 | doneb2e0a353c0fffe422045f1854aab4d22.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145778 | done76a6654661d536fb274c01777020489a.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145779 | done7b3e7db90c7d26ef8db6c2e27636ea3e.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145780 | done76a6654661d536fb274c01777020489a.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145781 | done7b3e7db90c7d26ef8db6c2e27636ea3e.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145782 | donee66b218eb19dff6323d8cb5e2f8a9662.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145787 | done0065662994d17848bbeaf4d339ddf61b.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145789 | done3300ed03dca91ccbddbbb8869c90a775.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145790 | donee66b218eb19dff6323d8cb5e2f8a9662.UserCountry   |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145798 | done0065662994d17848bbeaf4d339ddf61b.UserCountry   |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145799 | done3300ed03dca91ccbddbbb8869c90a775.UserCountry   |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145800 | doneadc1c82e72b84d8a5c70a12b2d2a16c4               |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:01 |     1 |
    |    145801 | done29120e797b1b155524562f48a2d9a7e6               |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:01 |     1 |
    |    145802 | doneb92fbb3009b32cf632965802de2fb760               |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:01 |     1 |
    |    145803 | doneb0647dedcb1ef8642450cb09d493131b.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145804 | done6d841b22d2761672e0cceb768e83ec73.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145805 | doneb0647dedcb1ef8642450cb09d493131b.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145806 | done6d841b22d2761672e0cceb768e83ec73.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145807 | done70be8a993da2c195bbee5de86ba843e8.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145808 | done70be8a993da2c195bbee5de86ba843e8.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145809 | donec4ccea4e464083a1b1d8e3732413e128.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145810 | donec4ccea4e464083a1b1d8e3732413e128.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145811 | done75820350d09d4a1f6f2cc006274726bc.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145812 | done3434944d5ecdfa589c23babffeac37d1.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145813 | done75820350d09d4a1f6f2cc006274726bc.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145814 | done3434944d5ecdfa589c23babffeac37d1.Goals         |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:00 |     1 |
    |    145815 | done8f3dd891b0d76e2e792d438e35f7c946.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:01 |     1 |
    |    145817 | done611e6bbc73fc7eef4b7dd135a1a31a8d.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:01 |     1 |
    |    145818 | done76d5c98defeefabe8b3163def2f97cf4.VisitsSummary |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:01 |     1 |
    |    145828 | done8f3dd891b0d76e2e792d438e35f7c946.UserCountry   |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:01 |     1 |
    |    145831 | done76d5c98defeefabe8b3163def2f97cf4.UserCountry   |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:01 |     1 |
    |    145832 | done611e6bbc73fc7eef4b7dd135a1a31a8d.UserCountry   |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:35:01 |     1 |
  5. Viewed the report in the UI to confirm that it would show in the database if it was processed. The following entries only showed up after I viewed the reports in the UI:
    |    146844 | done.VisitsSummary                                 |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:44:18 |     1 |
    |    146845 | done.CustomReports                                 |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:44:18 |     1 |
  6. The same is true for other premium features as well, their entries only showed up after I viewed them in the UI:
    |    146853 | done.FormAnalytics                                 |      1 | 2022-10-02 | 2022-10-07 |      5 | 2022-10-04 22:45:59 |     1 |

    So it looks like this is not just limited to Custom Reports, but the issue might exist for all premium features or non-core reports where the date range to pre-process is not actually processed?

Context

Your Environment

  • Matomo Version:
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
  • Browser:
  • Operating System:
@bx80 commented on October 26th 2022 Contributor

Thanks for reporting this @AltamashShaikh, from a quick look at the core code I can't see anything that would restrict this behavior to core, it seems like it should work in a similar manner to last7, last30 etc. The original issue is #14856

I've assigned this issue for prioritization and more investigation.

Powered by GitHub Issue Mirror