Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating an Annotation produces an unexpected error #19519

Open
JustinFinkelsteinKainos opened this issue Jul 12, 2022 · 2 comments
Open

Creating an Annotation produces an unexpected error #19519

JustinFinkelsteinKainos opened this issue Jul 12, 2022 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@JustinFinkelsteinKainos

Today I saw a number of errors in the logs for our self-hosted Matomo instance where it appears that a user attempted to add an Annotation. This resulted in the Annotation being added, but Matomo threw a PHP error in the process.

Expected Behavior

Annotation should be added without throwing a PHP error.

Current Behavior

In all cases, I can see the following actions in the server logs:

  1. HTTP POST to /index.php?date=2022-07-10&module=Annotations&action=addAnnotation&idSite=1&managerDate=2022-07-10&managerPeriod=range&note=Sample+annotation+(4pm)&period=range
  2. [Tue Jul 12 12:12:32.292376 2022] [php:notice] [pid 28552] [client 0.0.0.0:24895] Error in Matomo: The date '2022-06-27' is not a correct date range. It should have the following format: 'lastN', 'previousN', 'YYYY-MM-DD,YYYY-MM-DD'., referer: https://analytics.examplesite.org.uk/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday

Possible Solution

This looks like a parsing issue in the date range; however, it's not clear from the data shown here where the "last" and "previous" content is coming from.

Steps to Reproduce (for Bugs)

I was unable to reproduce this on your demo as annotations work fine in all of my testing, but still produce this odd error

Context

This doesn't seem to break anything, just causes an alert in our monitoring

Your Environment

  • Matomo Version: 4.8.0 (Docker)
  • PHP Version: 8.0.17
  • Server Operating System: Linux
  • Additionally installed plugins:
    ** API, Actions, Annotations, BulkTracking, Contents, CoreAdminHome, CoreConsole, CoreHome, CorePluginsAdmin, CoreUpdater, CoreVisualizations, CoreVue, CustomDimensions, CustomJsTracker, CustomReports 4.0.12, Dashboard, DevicePlugins, DevicesDetection, Diagnostics, Ecommerce, Events, Feedback, FormAnalytics 4.0.8, Funnels 4.0.10, GeoIp2, Goals, Heartbeat, ImageGraph, Insights, Installation, Intl, IntranetMeasurable, LanguagesManager, Live, Login, Marketplace, MobileMessaging, Monolog, Morpheus, MultiSites, Overlay, PagePerformance, PrivacyManager, ProfessionalServices, Proxy, Referrers, Resolution, RssWidget, SEO, ScheduledReports, SegmentEditor, SitesManager, Tour, Transitions, TwoFactorAuth, UserCountry, UserCountryMap, UserId, UserLanguage, UsersFlow 4.0.4, UsersManager, VisitFrequency, VisitTime, VisitorInterest, VisitsSummary, WebsiteMeasurable, Widgetize
@JustinFinkelsteinKainos JustinFinkelsteinKainos added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Jul 12, 2022
@peterhashair
Copy link
Contributor

Hi @JustinFinkelsteinKainos thank you for reporting this, I can reproduce it by changing the date selector to date range and making the start date and end date the same date, then creating an Annotation, it will show that error. Our product team will review this.

@peterhashair peterhashair added Needs priority decision This issue may need to be added to the current milestone by Product Manager Regression Indicates a feature used to work in a certain way but it no longer does even though it should. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. Regression Indicates a feature used to work in a certain way but it no longer does even though it should. labels Jul 13, 2022
@sgiehl sgiehl added the Bug For errors / faults / flaws / inconsistencies etc. label Jul 14, 2022
@sgiehl sgiehl added this to the For Prioritization milestone Jul 14, 2022
@JustinFinkelsteinKainos
Copy link
Author

JustinFinkelsteinKainos commented Jul 15, 2022 via email

@justinvelluppillai justinvelluppillai removed the Needs priority decision This issue may need to be added to the current milestone by Product Manager label Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

4 participants