Opened 4 years ago

Closed 4 years ago

#1371 closed Bug (fixed)

generateVisits.php - idSite parameter never in request, defaulting to idSite = 1

Reported by: JulienM Owned by:
Priority: low Milestone: Piwik 0.6.3
Component: Core Keywords:
Cc: Sensitive: no


In /misc/generateVisits.php : 74

$idSite = Piwik_Common::getRequestVar('idSite', $idSite, 'int');

is used as a mechanism to allow users to specify the id of the site for which visits will be generated.

In /misc/generateVisits.php : 67

<a href='?choice=yes&token_auth=".Piwik::getCurrentUserTokenAuth()."'><b>YES</b>, I want to generate fake visits</a>

there is no mechanism no let the user choose a site and set the parameter idSite. Therefore, the idSite always defaults to 1. Cf. /misc/generateVisits.php : 16

$idSite = 1;

This mechanism do work when the user specifies herself the parameter in the URL of the browser.

I found this bug because on my installation I have deleted site number 1 and only have site number 2. The following error is sent back to the requester :

You can't access this resource as it requires a 'view' access for the website id = 1.

Proposal :
Add a drop down menu with the list of available sites and set the idSite parameter with it.

Change History (3)

comment:1 Changed 4 years ago by vipsoft (robocoder)

  • Keywords visit generator removed
  • Milestone set to 2 - Piwik 0.8 - A Web Analytics platform

Fix along with #762 and #1369?

comment:2 Changed 4 years ago by halfdan

See #1374. I added a VisitorGenerator plugin that provides you with a website selector.

comment:3 Changed 4 years ago by vipsoft (robocoder)

  • Milestone changed from 2 - Piwik 0.8 - A Web Analytics platform to 0 - Piwik 0.6.3
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in #1374

Note: See TracTickets for help on using tickets.