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:
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?
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
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
@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.
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
enhanced=1 seems to work here: http://demo.piwik.org/index.php?module=API&method=MultiSites.getAll&period=month&date=2013-09-01&format=xml%20&enhanced=1
Do you have URL showing the bug?
create a new website and have a look whether it gets returned by MultiSites.getAll
In 7e5becd8df89b9bd1261b6fa10b36252536273bf: refs #3786 let the build fail by expecting MultiSites.getAll works with daterange and returns websites having 0 visits
In f1b47f64deef34b7ab916b68d2ef2badd2d8cca1: refs #3786 fix websites having 0 visits are not returned, fix MultiSites.getAll does not work with dates like last7
In a841abcc3e146f7f554928c73605cb005452ab27: refs #3786 make sure a website is set in case only one website is requested
In 8ae00385469e3798b8bae25b715e0b36189b8073: refs #3786 MultiSites.getOne should return website even if there are no visits
In 2a152563736237ba3a33909d2e91b45590b93476: refs #3786 fix MultiSites.getOne week integration test