• Resolved Shadow aok

    (@shadow-aok)


    Hello,

    I upgraded my wordpress blogs to WP-Piwik 0.10.0.3.
    I use a piwik account which has only view rights to all the websites.
    Piwik interface is only available using https, so I forced https and disabled the peer verification in expert settings.

    It worked fine with your plugin previous version.
    Now, when i reconfigured it (since settings were lost), it can’t find the associated website from Piwik (they all already exists).

    The plugin is well connected to my piwiki :

    WP-Piwik 0.10.0.3 is successfully connected to Piwik 2.13.1. You are running WordPress 4.2.2

    I keep gettings these errors :

    PHP Warning: Illegal string offset ‘main_url’ in plugins/wp-piwik/classes/WP_Piwik/Admin/Settings.php on line 120

    I added this on line 120 in wp-piwik/classes/WP_Piwik/Admin/Settings.ph :

    echo "<pre>";
    print_r( $piwikSiteDetails );
    echo "</pre>";

    Here’s what I got :

    Array
    (
        [result] => error
        [message] => You can't access this resource as it requires a 'superuser' access.
    )

    On the plugin select site list, i have this :

    <option value="result" selected="selected">e (e)</option>
    <option value="message">Y (Y)</option>

    If i give superuser access (admin access is not enough) to the user I use, it works (and creates a new site if “Auto config” is on).

    I have no errors on Piwik side.

    Any idea ?

Viewing 10 replies - 16 through 25 (of 25 total)
  • Plugin Author braekling

    (@braekling)

    Ok, thank you. Just to get a better understanding:

    – You are not using the auto config feature?
    – Can you please try to disable the cache (expert settings)? You can re-enable it after you finished testing.
    – Can you try this one: choose the correct site, save the settings, switch to tracking code, configure your tracking code and save the settings one more time?

    – I’m not using the auto-config feature, but it makes no difference if I do. The dropdown is replaced by “n/a”

    I disabled the cache, set the tracking code to “Default tracking” and got the same error message.

    I’m going to enable debugging to see if I can see something relevant.

    OK, so in the debug log, I see.

    [ 0.003 sec] Perform request: method=SitesManager.getJavascriptTag&idSite=n/a&mergeSubdomains=0&mergeAliasUrls=0&disableCookies=0

    This seems wrong : idSite=n/a

    Plugin Author braekling

    (@braekling)

    Did you also try step 3?

    – Can you try this one: choose the correct site, save the settings, switch to tracking code, configure your tracking code and save the settings one more time?

    If you choose a site and store, the site ID should be stored. “n/a” is normally only set if WP-Piwik was not able to estimate the current site… but estimation should only be done in auto mode.

    If step 3 also does not help: Can you check the site select box source code?

    Thank you.

    I understood step 3 as setting the tracking code mode to “Default tracking” and that did not change anything.

    If I set it to js/index.php, the form stays blank.

    Regarding the dropdown, the value is set at 0 instead of 15.

    Plugin Author braekling

    (@braekling)

    So the dropdown contains value “0” for all shown sites? But the site names are shown as expected?

    Really strange… I will check what can happen there and give you a feedback as soon as possible.

    @shadow aok: I’m sorry, but I can’t delete or edit posts here. Please tell a WordPress moderator – they can do this.

    There is only one site shown since that token only gives access to one site.

    Plugin Author braekling

    (@braekling)

    I was able to reproduce your issue. A fix will be provided with 0.10.0.6, also fixing the first issue reported by Shadow aok.

    Thanks for your contribution!

    Thread Starter Shadow aok

    (@shadow-aok)

    Nice work ??

    Thanks for fixing it quickly!

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘You can't access this resource as it requires a 'superuser' access.’ is closed to new replies.