Skip to content

GDPR tool doesn't work when selecting all websites #12842

@Findus23

Description

@Findus23

This could be related to #12312

The API-URL the tool tries to access is
index.php?date=1998-01-01,today&doNotFetchActions=1&filter_limit=401&format=JSON2&idSite=all&method=Live.getLastVisitsDetails&module=API&period=range&segment=countryCode%3D%3DDE

"An unexpected website was found in the request: website id was set to '1' 
.#0 /home/lukas/public_html/matomocopy/plugins/SitesManager/API.php(222): Piwik\\Site::setSiteFromArray(1, false)
#1 /home/lukas/public_html/matomocopy/core/Site.php(73): Piwik\\Plugins\\SitesManager\\API->getSiteFromId(1)
#2 /home/lukas/public_html/matomocopy/plugins/Live/Model.php(298): Piwik\\Site->__construct(Array)
#3 /home/lukas/public_html/matomocopy/plugins/Live/Model.php(335): Piwik\\Plugins\\Live\\Model->makeSite(Array)
#4 /home/lukas/public_html/matomocopy/plugins/Live/Model.php(244): Piwik\\Plugins\\Live\\Model->getWhereClauseAndBind('log_visit.idsit...', Array, Array, 'range', '1998-01-01,toda...', false, false)
#5 /home/lukas/public_html/matomocopy/plugins/Live/Model.php(39): Piwik\\Plugins\\Live\\Model->makeLogVisitsQueryString(Array, 'range', '1998-01-01,toda...', 'countryCode%3D%...', 0, 401, false, false, '')
#6 /home/lukas/public_html/matomocopy/plugins/Live/API.php(396): Piwik\\Plugins\\Live\\Model->queryLogVisits(Array, 'range', '1998-01-01,toda...', 'countryCode%3D%...', 0, 401, false, false, '')
#7 /home/lukas/public_html/matomocopy/plugins/Live/API.php(181): Piwik\\Plugins\\Live\\API->loadLastVisitorDetailsFromDatabase(Array, 'range', '1998-01-01,toda...', 'countryCode%3D%...', 0, 401, false, '', false)
#8 [internal function]: Piwik\\Plugins\\Live\\API->getLastVisitsDetails(Array, 'range', '1998-01-01,toda...', 'countryCode%3D%...', false, false, false, '1')
#9 /home/lukas/public_html/matomocopy/core/API/Proxy.php(236): call_user_func_array(Array, Array)
#10 /home/lukas/public_html/matomocopy/core/API/Request.php(253): Piwik\\API\\Proxy->call('\\\\Piwik\\\\Plugins\\\\...', 'getLastVisitsDe...', Array)
#11 /home/lukas/public_html/matomocopy/plugins/API/Controller.php(41): Piwik\\API\\Request->process()
#12 [internal function]: Piwik\\Plugins\\API\\Controller->index()
#13 /home/lukas/public_html/matomocopy/core/FrontController.php(559): call_user_func_array(Array, Array)
#14 /home/lukas/public_html/matomocopy/core/FrontController.php(137): Piwik\\FrontController->doDispatch('API', false, Array)
#15 /home/lukas/public_html/matomocopy/core/dispatch.php(34): Piwik\\FrontController->dispatch()
#16 /home/lukas/public_html/matomocopy/index.php(27): require_once('/home/lukas/pub...')
#17 {main}"

Quick debugging show that $infoSite is empty here:

if (empty($idSite) || empty($infoSite)) {

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions