@ericimprint opened this Issue on August 21st 2015

I have a basic regex goal of thanks4quote|/confirm/quote. Since upgrading to 2.15.0-b1 it has stopped working. The page visits are showing up in the log, but the goal is not being marked. This is still not fixed on b2 either.

@mattab commented on August 26th 2015 Owner

Hi @ericimprint, thanks for the report!
We will investigate before 2.15.0 stable.

@ericimprint commented on August 28th 2015

FYI, still not working in beta 3.

@tsteur commented on August 29th 2015 Owner

I tried to reproduce different patterns including a similar one than yours and it worked fine for me. I also debugged it and it should work. From the looks there were also no changes in the GoalManager class recently. From which version did you update?

The only thing that I noticed that could be potentially a problem is the character & as it seems to be replaced by an entity before the regexp is checked: http://apache.piwik/index.php?module=CoreHome&action=index&idSite=1&period=day&date=2015-08-29#/module=Goals&action=goalReport&idSite=1&period=day&date=2015-08-29&idGoal=6

image

Just to be sure we are talking about URLs and the "matches the expression" check?

@ericimprint commented on August 31st 2015

I upgraded from 2.14.3 and it didn't work for any of the 15 betas.
goalerror

@ericimprint commented on August 31st 2015

I tested this a little more and added the goal again under a new name and added a simple page visit goal. Neither are working, but I did notice visitor.visitConverted flag is getting triggered in the live visitor log for visits that trigger the goal.
The other interesting thing is the goal overall conversion rate graph is working, but not the reported number or the conversion rate for each individual goal in the goal widget of the dashboard.
goalerror2

@tsteur commented on September 1st 2015 Owner

I just tried to reproduce with allow multiple conversions but still works for me.

Can you maybe change the file core/Db/Adapter/Pdo/Mysql.php in line 79 (https://github.com/piwik/piwik/blob/master/core/Db/Adapter/Pdo/Mysql.php#L79) and comment it? Meaning putting // in front of $this->_connection->exec: // $this->_connection->exec and try again?

@tsteur commented on September 1st 2015 Owner

Otherwise maybe try to enable logging for the tracker: http://developer.piwik.org/api-reference/tracking-api#debugging-the-tracker in case you're familiar with the browser's developer console tool

@ericimprint commented on September 1st 2015

Can you maybe change the file core/Db/Adapter/Pdo/Mysql.php in line 79 (https://github.com/piwik/piwik/blob/master/core/Db/Adapter/Pdo/Mysql.php#L79) and comment it? Meaning putting // in front of $this->_connection->exec: // $this->_connection->exec and try again?

That made no change.

I turned on debugging and everything is getting passed to piwik correctly. The visits and pages are being logged and marked as a converted goal according to visitor.visitConverted.

I also turned off all 3rd party plugins and that made no difference.

@tsteur commented on September 2nd 2015 Owner

Maybe someone else can have a look and try to reproduce? Not sure what to do here.

Is it maybe possible that we get access to your Piwik instance and server? That would be helpful. If so, please send us an email to "hello at piwik.org" and comment here in case it goes to the spam folder.

@ericimprint commented on September 2nd 2015

I did a fresh install of a new testing system. Running 2.14.3 it converted a goal just fine. I upgraded it to beta 4 and the goals stopped converting as above. I emailed the access info for the new testing site to hello. The email came from Eric.

@ericimprint commented on September 8th 2015

This is not fixed with beta 5. Did you get my email with my testing site info?

@tsteur commented on September 9th 2015 Owner

Sorry! I got your email but didn't have time yet, will have a look now

@tsteur commented on September 10th 2015 Owner

Thanks a lot! This helped us to find a bug that would have hit many users over time. I'm getting the following error:

Fatal error: Unsupported operand types in core/Tracker/GoalManager.php on line 236 https://github.com/piwik/piwik/blob/2.15.0-b6/core/Tracker/GoalManager.php#L236

The CustomVariables plugin is disabled on that system (I checked) and that's why it is failing I believe. This is due to core having knowledge about plugins in https://github.com/piwik/piwik/blob/2.15.0-b6/core/Tracker/GoalManager.php#L227 . Ideally we would remove that knowledge from core but that's probably quite a bit of work and needs some refactoring.

I tried to add a simple check if (empty($visitCustomVariables)) { $visitCustomVariables = array(); } but couldn't verify as the PHP files seem to be cached and a server restart is possibly required (or an opcache clearance)

@ericimprint There's a chance that it works after refreshing the webserver.

@diosmosis do you mind having a look at it? Maybe there are more such similar issues re $request->getMetadata()?

@diosmosis commented on September 10th 2015 Member

@tsteur created a pull request here: https://github.com/piwik/piwik/pull/8751

I looked at all uses of Tracker\Request::getMetadata() this is the only one that assumes the value isn't empty(), everything else defaults the value or checks if it's !empty() before using it.

@ericimprint commented on September 10th 2015

#8751 Does not seem to fix this on my site (test or live) when applied to beta 6. I manually made the edit to core/Tracker/GoalManager.php and restarted Apache, I know this change is not included in the beta yet.

@diosmosis commented on September 11th 2015 Member

Reopening since OP reports it's not fixed for him

@mattab commented on September 11th 2015 Owner

this change didn't make it in beta6, it was merged after. it will be in beta7. @ericimprint please re-open if it won't be fixed in beta7

@ericimprint commented on September 11th 2015

Beta 7 fixed it. Thanks. Not sure why the manual change didn't, but doesn't really matter. Is there anyway to reprocess the visitor data to get the lost goal data back?

@mattab commented on September 11th 2015 Owner

Is there anyway to reprocess the visitor data to get the lost goal data back?

unfortunately we don't have this capability yet

@ericimprint commented on September 11th 2015

unfortunately we don't have this capability yet

Bummer.

There is still an error on the dashboard widget. It is showing a graph for the conversion rate, but listing it as a 0%.
goalerror3

It is listing it correctly on the goals page/tab.
goalerror4

@mattab commented on September 11th 2015 Owner

@ericimprint could you try remove widget and re-add it to dashboard, maybe this fixes it?

@ericimprint commented on September 11th 2015

@ericimprint could you try remove widget and re-add it to dashboard, maybe this fixes it?

That did the trick. All good. Thanks for your help.

This Issue was closed on September 11th 2015
Powered by GitHub Issue Mirror