Ticket #660 (closed maintenance: fixed)

Opened 3 years ago

Last modified 3 years ago

Piwik 2.0

Reported by: chris Owned by: chris
Priority: major Milestone: Maintenance
Component: Piwik Keywords:
Cc: ed Estimated Number of Hours: 0.5
Add Hours to Ticket: 0 Billable?: yes
Total Hours: 1.5

Description

The new version of Piwik will be out soon, the Piwik 2.0 Release Candidate just came out.

This ticket has beed created to document the upgrade.

Change History

comment:1 Changed 3 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 1.0
  • Status changed from new to closed
  • Resolution set to fixed
  • Total Hours changed from 0.0 to 1.0

Pwiki 2.0.1 came out yesterday, more info:

Following wiki:PiwikServer#Updates

sudo -i
cd /web/stats.transitionnetwork.org/
cp piwik/config/config.ini.php .

Switch off the recording of stats by adding this to /web/stats.transitionnetwork.org/piwik/config/config.ini.php

[Tracker]
record_statistics = 0

Download, extract, and update the database:

wget "http://piwik.org/latest.zip" -O latest.zip
unzip latest.zip
cp config.ini.php piwik/config/
chown -R www-data:www-data piwik/
php /web/stats.transitionnetwork.org/piwik/index.php -- "module=CoreUpdater"

The last step, which updates the database, took a long time to run -- the database is 2.6G.

Checking the settings:

GeoIP plugin is not compatible with Piwik 2.0.1.
If you've been using this plugin, maybe you can find a more recent version in the Marketplace. If not, you may want to uninstall it.

GeoIP plugin was uninstalled, we are using the GeoIP (HTTP Server Module) -- GeoIP HTTP headers are added by Nginx.

There are no issues reported on the System Check apart from:

Database abilities LOAD DATA INFILE

Using LOAD DATA INFILE will greatly speed Piwik's archiving process up. To make it available to Piwik, try updating your PHP & MySQL software and make sure your database user has the FILE privilege.

If your Piwik server tracks high traffic websites (eg. > 100,000 pages per month), we recommend to try fix this problem.
Error:

Try #1: LOAD DATA INFILE : SQLSTATE[28000]: Invalid authorization specification: 1045 Access denied for user 'stats'@'localhost' (using password: YES)[28000],
Try #2: LOAD DATA LOCAL INFILE : SQLSTATE[42000]: Syntax error or access violation: 1148 The used command is not allowed with this MySQL version[42000] 

Troubleshooting: FAQ on piwik.org http://piwik.org/faq/troubleshooting/#faq_194

However the suggestion has a problem:

mysql> GRANT FILE ON stats.* TO 'stats'@'localhost';
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

The answer to this is here, http://stackoverflow.com/questions/13552206/grant-file-on-just-one-database so:

mysql> GRANT FILE ON *.* TO 'stats'@'localhost';
Query OK, 0 rows affected (0.00 sec)

And that has resolved the "Database abilities" issue.

Another two plugin issues:

SecurityInfo plugin is not compatible with Piwik 2.0.1.
If you've been using this plugin, maybe you can find a more recent version in the Marketplace. If not, you may want to uninstall it.

VisitorGenerator plugin is not compatible with Piwik 2.0.1.
If you've been using this plugin, maybe you can find a more recent version in the Marketplace. If not, you may want to uninstall it.

So they were uninstalled.

The PSE : Person Segemnt were deleted as noted on ticket:663#comment:1

The Transition Culture segment I set up was based on "Page URL contains /blogs/rob-hopkins/" and someone had added an additional one based on "Page URL contains http://www.transitionnetwork.org/blogs/rob-hopkins", this was deleted as it will miss all HTTPS accesses to Robs blog and it is also duplication.

There are now just 3 simple segment reports:

  • PSE : URL Contains /pse/
  • Social Reporters : URL Contains /stories/
  • Transition Culture : URL Contains /blogs/rob-hopkins/

Accessing the Visitoor log these was this error:

An exception has been thrown during the rendering of a template ("Unable to create the cache directory (/web/stats.transitionnetwork.org/piwik/tmp/templates_c/67/d7).") in "@CoreHome/_dataTable.twig" at line 29.

That was fixed with:

chown -R www-data:www-data /web/stats.transitionnetwork.org/piwik/tmp/

iPhone and Android users with Pwiki accounts should also upgrade their Piwki apps, see http://piwik.org/blog/2013/12/piwik-mobile-2-changes-detail/

I have updated the wiki:PiwikServer page this ticket is now good to close.

comment:2 Changed 3 years ago by chris

  • Add Hours to Ticket changed from 0.0 to 0.5
  • Total Hours changed from 1.0 to 1.5

The custom logo has gone with the upgrade to the new templates, despite having the following set in /web/stats.transitionnetwork.org/piwik/config/config.ini.php:

[branding]
use_custom_logo = 1

These are the ones which are now used:

So, scaled / ratio fixed TN images were generated and uploaded:

So the following could be run to overwrite the files:

wget http://penguin.transitionnetwork.org/favicon.ico -O /web/stats.transitionnetwork.org/piwik/plugins/CoreHome/images/favicon.ico
wget http://penguin.transitionnetwork.org/logo.png -O /web/stats.transitionnetwork.org/piwik/plugins/Morpheus/images/logo.png
wget http://penguin.transitionnetwork.org/logo-header.png -O /web/stats.transitionnetwork.org/piwik/plugins/Morpheus/images/logo-header.png 

And the docs have been updated wiki:PiwikServer#Updates

comment:3 Changed 3 years ago by ed

Good work Chris. Looks good too. in 2014, TN will be able to produce some measurables based on the strategy, from which we can learn how to use the goals feature :)

Note: See TracTickets for help on using tickets.