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

MultiSites.getAll: Add option to not remove sites that have no visits #3786

Closed
tsteur opened this issue Mar 2, 2013 · 11 comments
Closed

MultiSites.getAll: Add option to not remove sites that have no visits #3786

tsteur opened this issue Mar 2, 2013 · 11 comments
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Mar 2, 2013

I'm using MultiSites.getAll for the "All websites dashboard" in new Piwik Mobile app to have same behavior as in Piwik (if MultiSites is enabled by user in settings defaultReport).

If one calls MultiSites.getAll the API will remove websites having 0 visitors. See:
https://github.com/piwik/piwik/blob/master/plugins/MultiSites/API.php#L300

This can result in no displayed websites in the "All Websites Dashboard". -> User can not select a website, can not pick another date or anything else. A user can simply not use the app if no website has a visitor yet.

Is it possible to add an option so that websites having no visitors won't be removed?

@mattab
Copy link
Member

mattab commented Apr 5, 2013

In d885213: Fixes #3786 Little hack for Piwik Mobile. You can now pass &enhanced=1 and it will return more metrics + will not remove the websites without visits

@tsteur
Copy link
Member Author

tsteur commented Aug 2, 2013

In [changeset:"a5be1e050f1819029d2f5158054356cb216d5fe4/piwikmobile2"]:
set enhanced parameter to prevent removing websites which have no visits, see #3786 . Unfortunately the enhanced parameter seems not to work, will have a deeper look later

@tsteur
Copy link
Member Author

tsteur commented Aug 2, 2013

@matt I reopen this ticket. It seems not to work for me. Maybe because of this? https://github.com/piwik/piwik/blob/master/core/DataAccess/ArchiveWriter.php#L214 Not sure. I have a fresh installation of Piwik here and I get the websites only when switching the period to year because there were only some visitors about a month ago.

Setting the enhanced parameter to 1/true has no effect.

@tsteur
Copy link
Member Author

tsteur commented Aug 4, 2013

FYI: Two beta testers have reported problems when the enhanced parameter is enabled (Piwik 1.12):

PHP Fatal error: Call to undefined method Piwik_DataTable_Array::getRows() in /home/***/public_html/***/plugins/MultiSites/API.php on line 256

@mattab
Copy link
Member

mattab commented Oct 14, 2013

@tsteur
Copy link
Member Author

tsteur commented Oct 14, 2013

create a new website and have a look whether it gets returned by MultiSites.getAll

@tsteur
Copy link
Member Author

tsteur commented Oct 29, 2013

In 7e5becd: refs #3786 let the build fail by expecting MultiSites.getAll works with daterange and returns websites having 0 visits

@tsteur
Copy link
Member Author

tsteur commented Oct 29, 2013

In f1b47f6: refs #3786 fix websites having 0 visits are not returned, fix MultiSites.getAll does not work with dates like last7

@tsteur
Copy link
Member Author

tsteur commented Oct 30, 2013

In a841abc: refs #3786 make sure a website is set in case only one website is requested

@tsteur
Copy link
Member Author

tsteur commented Oct 30, 2013

In 8ae0038: refs #3786 MultiSites.getOne should return website even if there are no visits

@tsteur
Copy link
Member Author

tsteur commented Oct 30, 2013

In 2a15256: refs #3786 fix MultiSites.getOne week integration test

@tsteur tsteur added this to the 2.0 - Piwik 2.0 milestone Jul 8, 2014
@tsteur tsteur self-assigned this Jul 8, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
…l works with daterange and returns websites having 0 visits
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
…ix MultiSites.getAll does not work with dates like last7
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants