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

Prevent possible error when goal deleted. #12395

Closed
wants to merge 1 commit into
base: 3.x-dev
from

Conversation

Projects
None yet
1 participant
@tsteur
Member

tsteur commented Jan 2, 2018

Should prevent an error like this:

Error: {"message":"Key \"\" for array with keys \"4\" does not exist.","file":"plugins\/Live\/templates\/_profileSummary.twig","line":24}

The visitor log / profile fetches currently all goal conversions and does check whether a goal still exists so not sure why it is needed (in https://github.com/piwik/piwik/blob/3.3.0-b1/plugins/Goals/VisitorDetails.php#L67 ). Where this happened the goal actually exists but the other first 3 goals are deleted.

Here is some output from visitor data and idGoal 4 is definitely set in goals


["totalConversionsByGoal"]=>
  array(2) {
    [1]=>
    int(0)
    ["idgoal=4"]=>
    int(1)
  }

It seems to cause an error when there is also an ecommerce action like here where I printed also {{ goals|json_encode }}{{ visitorData.totalConversionsByGoal|json_encode }}:

image

Actually: This does not fix the problem because it would never show any entry as idgoal=4 cannot be set in Goals so there must be a different fix.

Prevent possible error when goal deleted.
Should prevent an error like this:

```
Error: {"message":"Key \"\" for array with keys \"4\" does not exist.","file":"plugins\/Live\/templates\/_profileSummary.twig","line":24}
```

The visitor log / profile fetches currently all goal conversions and does check whether a goal still exists so not sure why it is needed  (in https://github.com/piwik/piwik/blob/3.3.0-b1/plugins/Goals/VisitorDetails.php#L67 ). Where this happened the goal actually exists but the other first 3 goals are deleted.

Here is some output from visitor data and idGoal 4 is definitely set in `goals`
```

["totalConversionsByGoal"]=>
  array(2) {
    [1]=>
    int(0)
    ["idgoal=4"]=>
    int(1)
  }
```
@tsteur

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Jan 3, 2018

Member

Actually, the bug was caused by another plugin.

Member

tsteur commented Jan 3, 2018

Actually, the bug was caused by another plugin.

@tsteur tsteur closed this Jan 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment