Archiving rejects recent visits?

Hi

In Piwik 1.7.1, we have records in piwik_log_visit with

idsite = 3
visit_first_action_time = 2012-04-18 19:38:00
visit_last_action_time = 2012-04-18 19:38:07

But when we run

misc/cron/archive.php --url=http://URL_HERE 3600 --force-all-websites --force-all-periods

We get in the response:

Skipped website id 3, no visits in the last 52 days

This seems wrong as the date today is 2012-04-23.

We end up with records in

piwik_archive_numeric_2012_04

But no records in

piwik_archive_blob_2012_04

and consequently nothing for this site in the piwik front end.

Do you have any experience of this problem? Are you using the archive script wrongly?

Thanks

This may be relevant to this posting:

http://URL_HERE/piwik.php?module=API&method=VisitsSummary.getVisits&idSite=3&period=week&date=2012-04-14&format=php&token_auth=–secret–

gives the following response:

[b]Invalid idSite

Backtrace:
#0 /var/www/tracker/nano/core/Tracker.php(110): Piwik_Tracker_Visit->setRequest(Array)
#1 /var/www/tracker/nano/piwik.php(83): Piwik_Tracker->main()
#2 {main}[/b]

with debug:

Debug enabled - Input parameters:
array ( ‘module’ => ‘API’, ‘method’ => ‘VisitsSummary.getVisits’, ‘idSite’ => ‘3’, ‘period’ => ‘week’, ‘date’ => ‘2012-04-14’, ‘format’ => ‘php’, ‘token_auth’ => ‘–secret–’, )
token_auth is authenticated!
Loading plugins: { Provider,Goals }
Current datetime: 2012-04-23 08:16:55

This seems puzzling as the piwik installation definitely has a site 3.

Hope that helps.

Regards

Further:

It looks to us that there might be a typo in

core/Tracker/Visit.php, line 89:

$idsite = Piwik_Common::getRequestVar(‘idsite’, 0, ‘int’, $this->request);

With this, when we make the API call

http://URL_HERE/piwik.php?module=API&method=VisitsSummary.getVisits&idSite=3&period=week&date=2012-04-14&format=php&token_auth=–secret–

We get

request={“module”:“API”,“method”:“VisitsSummary.getVisits”,“idSite”:“3”,“period”:“week”,“date”:“2012-04-14”,“format”:“php”,“token_auth”:"–secret–"}

idsite=0

If we change the line to read

$idsite = Piwik_Common::getRequestVar(‘idSite’, 0, ‘int’, $this->request);

we get
idsite=3

but

GET parameter rec not found in URL, request excluded
Visitor excluded.
Nothing to notice => default behaviour
End of the page.

This is with version 1.7.1

Regards

to the API it is idSite, to the Tracking piwik.php it is idsite

Thanks Matt

Regards

David