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
Assorted events and changes #12496
Assorted events and changes #12496
Conversation
Re |
01df73a
to
c99ec25
Compare
@tsteur Modified this PR based on our slack convo, had to add two more changes to get my use case to work. Let me know if there's still an issue. |
Looks good @diosmosis |
c99ec25
to
46537df
Compare
@tsteur Updated this PR to have a new event |
👍 |
@matomo-org/core-team would it be possible to merge this PR? |
…can occur during development.
…ormal API execution.
…alled in every other use of core/API/Proxy.
…datatable post processing for certain requests.
Just one more thing: Can you mention the new events in the |
…ocessing, SitesManager.shouldPerformEmptySiteCheck to changelog.
46537df
to
f83097c
Compare
@tsteur rebased + edited the changelog, test failure seems unrelated. |
👍 |
* Throw exception if date is empty in Period\Factory::build() since it can occur during development. * Add API.Request.intercept event in API\Proxy so plugins can preempt normal API execution. * Use Request::getRenamedModuleAndAction() in Visualization, as it is called in every other use of core/API/Proxy. * Add new SitesManager.shouldPerformEmptySiteCheck event. * Add event Request.shouldDisablePostProcessing so plugins can disable datatable post processing for certain requests. * Make sure DataTable metadata is serialized with the table. * Add description of API.Request.intercept, Request.shouldDisablePostProcessing, SitesManager.shouldPerformEmptySiteCheck to changelog.
Changes:
Period\Factory::build()
if$date
is null. This happened while I was developing and it took me a very long time to figure out what was going on. An exception would have helped.Request::getRenamedModuleAndAction()
inVisualization
. I found that was the one spot that didn't call this function before usingPiwik\Api\Proxy
.SitesManager.shouldPerformEmptySiteCheck
event so plugins can disable the check for certain sites.API.Request.intercept
event to inAPI\Proxy
. If a plugin sets$returnedValue
, the actual function call is skipped.Request.shouldDisablePostProcessing
so plugins can disable datatable post processing for certain requests (if, for example, the request's post processing is done somewhere else).totals
shows up whenserialize=1&original=1
. Don't think this will have a effect on DB size since only the rows are stored in the DB. Not sure what else serializes DataTable.Note: I can cherry pick this into multiple PRs if needed & am also open to changing it.