WordPress.org

Forums

WP-Piwik
[resolved] An error occured: Unknown site/blog (7 posts)

  1. fluvius
    Member
    Posted 11 months ago #

    Hi,

    I installed Piwik on my site and then installed the WP-Piwik plugin.

    When I entered the URL and token details it told me 'An error occured: Please check URL and auth token. You need at least view access to one site.'

    I've checked the URL and token fields but those are the correct settings.
    Here's the result of running the Support Test Script (I've anonymised the site url):

    *** Test 1/2: SitesManager.getSitesWithAtLeastViewAccess ***
    Using: cURL
    SSL peer verification: enabled
    User Agent: WP-Piwik
    Call: http://www.mysite.co.uk/stats/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth= + TOKEN
    Result:
    
    Time: 0s
    
    *** Test 2/2: SitesManager.getSitesIdFromSiteUrl ***
    Using: cURL
    SSL peer verification: enabled
    User Agent: WP-Piwik
    Call: http://www.mysite.co.uk/stats/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2Fwww.sinestar.co.uk&format=XML&token_auth= + TOKEN
    Result:
    
    Time: 0s

    It's almost as if the Piwik install can't be found, but I can log into the Piwik dashboard, so I know it's working.

    What am I failing to do?

    Thanks in advance,
    Tony.

    https://wordpress.org/plugins/wp-piwik/

  2. braekling
    Member
    Plugin Author

    Posted 11 months ago #

    The requests were not performed. Please check your firewall settings, your server settings (does your hoster allow http requests from your server/webspace to itself? E.g., host gator does not by default.)

    Did you/Can you try the PHP API instead of the REST API?

    http://wordpress.org/support/topic/piwik-did-not-answer-please-check-your-entered-piwik-url?replies=15

  3. fluvius
    Member
    Posted 11 months ago #

    Hi,

    Thanks for your feedback.
    I contacted the host and they confirmed that they don't permit requests from the server/webspace to itself for security reasons.

    They provided the path to the site so I could try that instead, but when I enter the path into the Piwik path field (/home/sites/mydomain.co.uk/public_html/stats/) it gives an error page containing just the text 'This XML file does not appear to have any style information associated with it. The document tree is shown below.'

    When I look at the error log it shows the following entries:

    /home/sites/mydomain.co.uk/public_html/develop/wp-content/plugins/wp-piwik/wp-piwik.php on line 765
    mydomain.co.uk [Sun Aug 03 14:49:25 2014] [error] [client 82.41.167.194:54429] AH01215: PHP Notice:  Undefined variable: objRequest in /home/sites/mydomain.co.uk/public_html/develop/wp-content/plugins/wp-piwik/wp-piwik.php on line 765
    mydomain.co.uk [Sun Aug 03 14:49:25 2014] [error] [client 82.41.167.194:54429] AH01215: PHP Notice:  Use of undefined constant ob_start - assumed 'ob_start' in /home/sites/mydomain.co.uk/public_html/develop/wp-content/plugins/wp-piwik/wp-piwik.php on line 762
    mydomain.co.uk [Sun Aug 03 14:49:25 2014] [error] [client 82.41.167.194:54429] AH01215: PHP Fatal error:  Call to a member function process() on a non-object in /home/sites/mydomain.co.uk/public_html/develop/wp-content/plugins/wp-piwik/wp-piwik.php on line 765

    I don't know if this is something that I should feed back to the host, or whether you have any ideas what's going on :)

    Thanks again,
    Tony.

  4. braekling
    Member
    Plugin Author

    Posted 11 months ago #

    Looks like your path does not fit. The error shows that the object $objResult does not exist, which should be an object of Piwik\API\Request.

  5. fotoglut
    Member
    Posted 11 months ago #

    ive got an similar Problem, since Update of Piwik to 2.4.1
    With Version of Piwik do you use?

  6. fluvius
    Member
    Posted 10 months ago #

    Hi fotoglut. I'm using Piwik version 1.12.

  7. braekling
    Member
    Plugin Author

    Posted 10 months ago #

    Please refer to the plugin description:

    You need a running Piwik 2.0.2 or higher installation and at least view access to your stats. Also PHP 5.3 or higher is strictly required.

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

    You should update your Piwik to the latest version.

Reply

You must log in to post.

About this Plugin

  • WP-Piwik
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic