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
Fix metadata problem for goal reports #9993
Conversation
With the steps you mentioned I can reproduce it as well. I'm not sure if it's the best fix though as it might find a report when an idGoal is given when it should not find one etc. It might be a not so good workaround as well but maybe if (!empty($request['idGoal']) && in_array($this->apiModule, array('Goals', 'Ecommerce'))) { This would be needed everywhere though so we would need to rather handle this in if (!empty($apiParameters['idGoal']) && in_array($apiModule, array('Goals', 'Ecommerce'))) {
unset($apiParameters['idGoal']); I bet this has side effects though as well and this workaround would be kind of against the Piwik platform thought as other plugins might use If we always had the if (!empty($request['idGoal']) && $viewDataTable !== 'tableGoals') { The problem is that in this case the Another fix could be to not use Not sure about side effects there though. I think I would prefer not to fix it in So many things to fix this but there's not really a perfect solution for this I presume |
Had another thought on that. But I guess you're right:
Using Using the The only other "fix" that came to my mind would be to disable the flattening feature for those reports displayed for specific goals. But imho that's not better aswell and I'm not sure if the error might occur in other cases, aswell. What do you think? |
I think the other visualizations do not need the {"result":"error","message":"Invalid dimension 'null'."} |
I reckon we could merge this fix as suggested and then work on a fix around the visualization TableGoals I would say |
@tsteur Ok. Changed it to use |
Sorry, I meant we can merge as it is without checking for API Module. By checking for module I'm not sure if it eg breaks Funnel plugin etc. |
Ah ok. Reverted my last rebase. Should be as before now. |
Tried to fix #9697.
I don't think that it is the best solution, but I guess it shouldn't have any side effects this way.
Note regarding: #9697 (comment)
Removing lines 159-161 completely would fix this issue aswell, but that might create problems for other goal reports where the
idGoal
is part of the metadatafixes #9697