• Resolved codifex

    (@codifex)


    I updated WP-Piwik to 0.10.1.0 some days ago. Since the update existing websites of the multisite networks I am maintaining are added as new sites to Piwik automatically. This means that Piwik shows two separate statistics for the exact same site example.org. However, visits to the site are correctly assigned to the existing site containing the old statistics data. Statistics for the duplicate site entry are empty (no visits).

    I updated to WP-Piwik 1.0 and the problem still exists. It even occurs after uninstalling/reinstalling+reconfiguring WP-Piwik. I did not update Piwik in the meantime and the problem never occurred before.

    I am interested in any idea on how to fix it. In the meantime I deleted the duplicate sites in Piwik, but it seems that existing sites are added as duplicate from time to time (not all at once, but one after the other).

    https://www.ads-software.com/plugins/wp-piwik/

Viewing 15 replies - 16 through 30 (of 30 total)
  • Plugin Author braekling

    (@braekling)

    You can try to reset WP-Piwiks settings and monitor the re-creation of the id mapping (which should be done by and by if a site is requested the first time after resetting WP-Piwik).

    I’m working on a solution to avoid the double creation of sites.

    “Hotfix”: If you do not need to create new sites frequently, you can switch to a view only auth token – so WP-Piwik can continue working but is not allowed to create new sites.

    Thread Starter codifex

    (@codifex)

    Thank you for your effort in solving this problem. It is highly appreciated!

    Does using the auth token of a user with view privileges only keep logging enabled?

    I found a workaround without resetting WP-Piwik by

    a) Switching the connection between WP-Piwik and Piwik to “selfhosted PHP API”. That seemed to have resolved the connection problems.

    b) Deleting the additional websites in Piwik manually until the id mapping was correct again (seems that WP-Piwik starts its search for existing sites from the last known ID upwards, therefore I had to delete all the occurences of a site if I wanted to set it to a lower ID number).

    For the time being that seems to work and no more new sites pop up in Piwik.

    Resetting WP-Piwik fixed this, with a bit of mucking around with auth codes to get the tracking code to not have the idSite error.

    Plugin Author braekling

    (@braekling)

    If my assumption about this issue is correct, the following change will fix the error:

    1. Open classes\WP_Piwik.php
    2. Go to line 1016
    3. Look for if (empty ( $result ) || ! isset ( $result [0] ))
    4. And replace by if (is_array( $result ) && empty( $result ))

    I will perform some more tests with this. But if one of you likes to test this change, too, it would be great. The update will be available within the next days.

    I’ve got WordPress 4.2.2 and Piwik 2.14.0 and also experienced duplicate website creation by WP-Piwik. When I tried using the PHP API to connect, it rendered the admin panel inoperable (could not view the WP-Piwik settings page or disable the plugin), and had to manually delete the plugin files. The admin went back to normal after deleting the plugin files, but when I tried to re-install the plugin it breaks the admin again. I’m happy to donate to your project if I can get this working. I’m also willing to give you access to my server if you want to troubleshoot.

    Plugin Author braekling

    (@braekling)

    Thanks for the redirection, resolved the issue by reverting to HTTP settings in the linked post above.

    Plugin Author braekling

    (@braekling)

    Btw: The fix mentioned above will be part of the next WP-Piwik release. I’m just waiting for the Piwik team to fix the PHP API issue before I release a new version. (Maybe I also have to change my code and this should be part of the next WP-Piwik release, of course.)

    This error occours here too, 1643 sites in Piwik instead of ~50. Therefore I am looking forward to the next WP-Piwik-Release.

    Plugin Author braekling

    (@braekling)

    1.0.3 available.

    I’m not able to reproduce the issue itself (in some few cases there is a duplicate, but nothing I can reproduce again and again)… So please tell me if this update fixes the issue. (I got now replies on the hotfix above, so I don’t know if anybody tested it already.)

    Plugin Author braekling

    (@braekling)

    Because there is not additional feedback and also no more bug reports, I will mark this topic as resolved.

    If the issue occurs again, please feel free to post here & I will re-open the thread.

    Hmmm – I just found this problem on my own multisite WordPress install and reported it here https://www.ads-software.com/support/topic/multisite-piwik-configuration?replies=2&post-7395329

    But now I am a bit confused about what exactly needs to be done to resolve the issue.

    1. I need to delete superfluous double sites. But: Does it matter which ones? Which one is the site containing the data, the first or the last, or how do I know, or does it matter at all which ones I delete?

    2. Do I need to change anything anywhere else, such as in the wp-piwik configuration?

    Besides: How do I delete most easily 1000 identical sites? :-O

    Plugin Author braekling

    (@braekling)

    1. Just delete all sites which does not contain data. For each blog just one real, tracking site should exist.

    2. After cleaning your Piwik configuration/database, you should reset and reconfigure WP-Piwik (Settings -> WP-Piwik -> Support -> Reset link). This only affects your WP-Piwik settings and does not harm your Piwik data.

    3. Best way would be to delete them in your database, I think. Maybe the Piwik community can give you a hint on this, I’m not sure if it is maintanable to delete sites in the database directly. Sorry!

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘Sites added to Piwik multiple times in WP multisite network since 0.10.1.0’ is closed to new replies.