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

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

Closed
julienmoumne opened this issue May 22, 2010 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@julienmoumne
Copy link
Member

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.


@robocoder
Copy link
Contributor

Fix along with #762 and #1369?

@halfdan
Copy link
Member

halfdan commented May 23, 2010

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

@robocoder
Copy link
Contributor

Fixed in #1374

@julienmoumne julienmoumne added this to the Piwik 0.6.3 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
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants