@tsteur opened this Issue on March 2nd 2013 Owner

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 commented on April 5th 2013 Owner

In d88521348b5c679a767c322d7edb9e24f929e5c4: 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 commented on August 2nd 2013 Owner

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 commented on August 2nd 2013 Owner

@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 commented on August 4th 2013 Owner

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 commented on October 14th 2013 Owner
@tsteur commented on October 14th 2013 Owner

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

@tsteur commented on October 29th 2013 Owner

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

@tsteur commented on October 29th 2013 Owner

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

@tsteur commented on October 30th 2013 Owner

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

@tsteur commented on October 30th 2013 Owner

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

@tsteur commented on October 30th 2013 Owner

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

This Issue was closed on October 30th 2013
Powered by GitHub Issue Mirror