• Resolved Marc Nilius

    (@zottto)


    After the update to verson 1.1.4 the connection to the matomo installation is lost and the admin screen gives me the following error message:

    WP-Matomo 1.0.31 was not able to get sites with at least view access:
    Die Methode ‘getSitesWithAtLeastViewAccess;idSite=17’ existiert nicht oder ist im Modul ‘\Piwik\Plugins\SitesManager\API’ nicht verfügbar.

    (translated: The method ‘getSitesWithAtLeastViewAccess;idSite=17’ does not exist or is not available in the module ‘\Piwik\Plugins\SitesManager\API’)

    The version “1.0.31” in the message is wrong, it looks like this is still the old bug of hard-coded plugin version in the code.

    This error does only happen for one site, it does not happen for other sites that connect to the same matomo installation.

    If I rollback to the old version 1.1.3, everythings is working fine.

    How can I fix this to be able to use the latest version?

    Thanks,
    Marc

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Marc Nilius

    (@zottto)

    Root cause for this bug found:

    The WordPress server had the following configuration in php.ini:

    arg_separator.output=";"

    Version 1.1.4 changed the way the build_url function in classes/WP_Piwik/Request.php works. It now uses http_build_query which again uses arg_separator.output.

    That produces
    method=SitesManager.getSitesWithAtLeastViewAccess;idSite=17
    which is on Matomo side interpreted incorrectly because the Matomo server only expected arg_separator.input to be “&”.

    I recommend to change the build_url function to

    protected function build_url( $config ) {
    return http_build_query( $this->get_url_params( $config ), '', '&' );
    }

    That would make sure, that always “&” is used as a separator.

    Marc

    Plugin Author dizzyatinnocraft

    (@dizzyatinnocraft)

    Hi Marc, thanks for the bug report and the investigation. This will be fixed in the next version, which we’ll release some time this week.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.