WordPress.org

Ready to get started?Download WordPress

Forums

WP-Piwik
[resolved] On one of my sites, I get : "An error occured: Please check URL and auth token." (10 posts)

  1. montrealsteve
    Member
    Posted 1 year ago #

    This is strange. It works fine on some sites, but on one of them it gives me the following message on the page where the auth token is inserted : An error occured: Please check URL and auth token. You need at least view access to one site.

    It's particularly strange since this site is part of a multisite installation and I've activated WP-Piwik without any problem for two other sites on that network.

    I'm running WordPress Multisite 3.5.1 with the most recent version of this plugin.

    Here is my info from the test script. All I removed from the code pasted below is the piwik session IDs, since I'm not sure if I should post that publicly. It's only the site with id 4 that's not working :

    *** Test 1/2: SitesManager.getSitesWithAtLeastViewAccess ***
    Using: cURL
    SSL peer verification: enabled
    User Agent:
    Call: analytics.steveb.koumbit.org/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth= + TOKEN
    Result:
    HTTP/1.1 200 OK
    Date: Wed, 22 May 2013 21:01:39 GMT
    Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze14 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o
    X-Powered-By: PHP/5.3.3-7+squeeze14
    Set-Cookie: PIWIK_SESSID=...; path=/; HttpOnly
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Vary: Accept-Encoding
    Content-Length: 1583
    Content-Type: text/xml; charset=utf-8
    
    <?xml version="1.0" encoding="utf-8" ?>
    <result>
    	<row>
    		<idsite>2</idsite>
    		<name>Révisions et Traductions Palindrome</name>
    		<main_url>http://fr.palindromeservices.com</main_url>
    		<ts_created>2013-05-22 20:45:32</ts_created>
    		<ecommerce>0</ecommerce>
    		<sitesearch>0</sitesearch>
    		<sitesearch_keyword_parameters />
    		<sitesearch_category_parameters />
    		<timezone>America/Montreal</timezone>
    		<currency>USD</currency>
    		<excluded_ips />
    		<excluded_parameters />
    		<excluded_user_agents />
    		<group />
    		<keep_url_fragment>0</keep_url_fragment>
    	</row>
    	<row>
    		<idsite>4</idsite>
    		<name>Palindrome Translation and Editing</name>
    		<main_url>http://palindromeservices.com</main_url>
    		<ts_created>2013-05-22 20:49:49</ts_created>
    		<ecommerce>0</ecommerce>
    		<sitesearch>0</sitesearch>
    		<sitesearch_keyword_parameters />
    		<sitesearch_category_parameters />
    		<timezone>America/Montreal</timezone>
    		<currency>USD</currency>
    		<excluded_ips />
    		<excluded_parameters />
    		<excluded_user_agents />
    		<group />
    		<keep_url_fragment>0</keep_url_fragment>
    	</row>
    	<row>
    		<idsite>5</idsite>
    		<name>Climate Justice Montreal</name>
    		<main_url>http://climatejusticemontreal.ca</main_url>
    		<ts_created>2013-05-22 20:56:44</ts_created>
    		<ecommerce>0</ecommerce>
    		<sitesearch>1</sitesearch>
    		<sitesearch_keyword_parameters />
    		<sitesearch_category_parameters />
    		<timezone>America/Montreal</timezone>
    		<currency>USD</currency>
    		<excluded_ips />
    		<excluded_parameters />
    		<excluded_user_agents />
    		<group />
    		<keep_url_fragment>0</keep_url_fragment>
    	</row>
    </result>
    Time: 0.4s
    
    *** Test 2/2: SitesManager.getSitesIdFromSiteUrl ***
    Using: cURL
    SSL peer verification: enabled
    User Agent:
    Call: analytics.steveb.koumbit.org/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2Fpalindromeservices.com&format=XML&token_auth= + TOKEN
    Result:
    HTTP/1.1 200 OK
    Date: Wed, 22 May 2013 21:01:40 GMT
    Server: Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze14 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o
    X-Powered-By: PHP/5.3.3-7+squeeze14
    Set-Cookie: PIWIK_SESSID=...; path=/; HttpOnly
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Vary: Accept-Encoding
    Content-Length: 94
    Content-Type: text/xml; charset=utf-8
    
    <?xml version="1.0" encoding="utf-8" ?>
    <result>
    	<row>
    		<idsite>4</idsite>
    	</row>
    </result>
    Time: 0.26s

    http://wordpress.org/extend/plugins/wp-piwik/

  2. montrealsteve
    Member
    Posted 1 year ago #

    The analytics seem to work fine. I see now that I get stats for the website. The error message is still there though. I'm not sure whether I should be concerned or not.

  3. montrealsteve
    Member
    Posted 1 year ago #

    Hmm... now there is a second site on the same multi-site where it gives the same error. The two use the same theme, unlike the other sites on the multi-site network. Otherwise the activated plug-ins are the same.

    Another possible difference is that in the case of the two sites that don't work, I initially put the wrong value under "Piwik URL (REST API):" and then corrected it soon after.

    I looked in the database, in the wpmulti_X_options tables, for the wp-piwik_global-settings
    and
    wp-piwik_settings
    Comparing one of the ones that gives an error with one that doesn't, I see only a couple interesting differences in wp-piwik_global-settings:
    ..."add_tracking_code";s:1:"1";s:20:... vs "add_tracking_code";b:0;s:20:...
    Also, only the one that works has at the end : "track_cdnurl";s:0:"";

    Anyhow, I realize that this is maybe not a big deal that the error shows up, as things seem to work fine. Could someone more knowledgeable at least give their opinion as to whether they think this error is likely to point to any future problems or whether it's not worth checking out further?

  4. braekling
    Member
    Plugin Author

    Posted 1 year ago #

    0.9.9.6 will allow you to disable the caching functionality. Please disable cache and try to open your sites settings again. Maybe the API call just didn't work one time... and this result was cached.

  5. arfore
    Member
    Posted 1 year ago #

    I had this same problem happening on my site as well. Even though the tracking stats were working fine the home tab of the plugin settings showed the error message.

    After updating to version 0.9.9.6 and disabling the cache the error went away and I got the expected information on the home tab.

  6. lucasbg
    Member
    Posted 1 year ago #

    Same here. It happened after updating Piwik to 1.12

  7. braekling
    Member
    Plugin Author

    Posted 1 year ago #

    And disabling the cache solved your problem, too?

  8. lucasbg
    Member
    Posted 1 year ago #

    Yes, disabling the cache did the job. Thanks.

  9. montrealsteve
    Member
    Posted 1 year ago #

    Disabling cache did the job for me too. Thanks very much for the support. And great plug-in, by the way. Much appreciated.

  10. montrealsteve
    Member
    Posted 1 year ago #

    Oh yeah, by the way, if anyone is wondering, to disabled the cache it seems that it works well to add the line force_compile = TRUE to /config/config.ini.php.

    Moments later, seeing that everything was working fine, I removed then removed the line that was just added, and still everything seems fine.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic