All referers are handled as direct entry

Final Update:
This report was invalid due to a problem not directly related with Piwik. See the bug tracker for details.

Hi!

I’m new to Piwik and using the release 0.4.3. In the frontend all referers are displayed as direct entries, so that in the widgets “List of keywords”, “List of external Websites” and “Best search engines” only show “no data for this table”.

On the referers dashboard I can see N direct entries, but no hits from other sources.
Going directly to the database and viewing the table log_visit returns for referer_type always 1 (i.e. direct access), even though the referer_url has often nothing to do with the URL of my website. For example there are some google and bing queries which are not recognized.

How can I solve this problem?

Update:
The problem is inside core/Tracker/Visit.php
Parsing of the refererUrl / currentUrl fails. html_entity_decode does nothing.

Update 2:
There’s a urldecode missing… All URLs stored in the database begin with http%3A%2F%2F which html_entity_decode does not convert.
I’m using php 5.2.6 here.

Update 3:
I’ve replaced all occurences of html_entity_decode with urldecode in core/Tracker/Visit.php. It seems to work.

Regards,
codepoet

Please attach your patch to http://dev.piwik.org/trac/ticket/949 and provide some sample data and phpinfo.