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

Showing http://http://example.org for outlinks when using MYSQLI #3408

Closed
BeezyT opened this issue Sep 25, 2012 · 6 comments
Closed

Showing http://http://example.org for outlinks when using MYSQLI #3408

BeezyT opened this issue Sep 25, 2012 · 6 comments
Milestone

Comments

@BeezyT
Copy link
Member

@BeezyT BeezyT commented Sep 25, 2012

Since Piwik 1.8.4, we use the column url_prefix in log_action. The column is nullable but the MYSQLI adapter does not support NULL values. This results in 0 being written into the database for outlinks (that the UI shows http:// twice is correct behavior - the problem is that the data is incosistent).

@BeezyT
Copy link
Member Author

@BeezyT BeezyT commented Sep 25, 2012

(In [7056]) fixes #3408 handle NULL values in prepared statement and MYSQLI

@BeezyT
Copy link
Member Author

@BeezyT BeezyT commented Sep 25, 2012

If you have experienced this bug, you can fix the damage easily.

First, fix your database:

UPDATE piwik_log_action SET url_prefix = NULL WHERE type != 1;

After that, the visitor log is back to normal.

Then, drop the archives since September 2012. So if you read this in October, you need to drop (i.e. delete) the MySQL tables piwik_archive_blob_2012_09, piwik_archive_blob_2012_10, piwik_archive_numeric_2012_09 and piwik_archive_numeric_2012_10.

If you have browser archiving enabled, the archives will be recreated on demand. If you use the cronjob, run it.

After doing that, the other reports (e.g. outlinks) should be back to normal.

Note: This only works for new actions if you either apply the patch above by hand or have a version of Piwik installed that includes the change (> 1.8.4).

@anonymous-piwik-user
Copy link

@anonymous-piwik-user anonymous-piwik-user commented Oct 10, 2012

Hi,

I think it's related but the fix didn't helped.

Now our urls in action=getVisitorLog:

<a href="test.domain1.com/" target="_blank" style="margin-left: 25px;text-decoration:underline;">test.domain1.com/</a>

title (it's from import_logs but we set action_name as url):
http:/test.domain1.com

Thanks.

@BeezyT
Copy link
Member Author

@BeezyT BeezyT commented Oct 10, 2012

Have you executed the SQL statement AND added the code change? You can do that by either applying [7056] by hand or downloading the latest beta: http://builds.piwik.org/piwik-1.9-b10.zip

@anonymous-piwik-user
Copy link

@anonymous-piwik-user anonymous-piwik-user commented Oct 12, 2012

Yeap, we've double checked that.

@BeezyT
Copy link
Member Author

@BeezyT BeezyT commented Oct 12, 2012

Since you have a custom log import setup, I would suspect the error must be in there.

It has been confirmed multiple times that this fix works. If you need support with log import, please use the forum.

@BeezyT BeezyT added this to the 1.9 -- Piwik 1.9 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants