Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error after upgrading from piwik 2.15.0 to 2.16.0 : Undefined index: piwik_pro_ads_enabled #9736

Closed
jgrisa opened this issue Feb 9, 2016 · 9 comments
Assignees
Labels
answered For when a question was asked and we referred to forum or answered it.
Milestone

Comments

@jgrisa
Copy link

jgrisa commented Feb 9, 2016

Before doing an upgrade of the php code and bbdd to 2.16.0

I have the errors:

WARNING: /software/apache/www/estadisticas/core/Config.php(161): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING: /software/apache/www/estadisticas/core/PiwikPro/Advertising.php(54): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING: /software/apache/www/estadisticas/core/PiwikPro/Advertising.php(54): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING: /software/apache/www/estadisticas/core/Config.php(161): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING: /software/apache/www/estadisticas/core/Config.php(161): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING: /software/apache/www/estadisticas/core/PiwikPro/Advertising.php(54): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING: /software/apache/www/estadisticas/core/Config.php(161): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING: /software/apache/www/estadisticas/core/Config.php(161): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING: /software/apache/www/estadisticas/core/PiwikPro/Advertising.php(54): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)

WARNING: /software/apache/www/estadisticas/core/PiwikPro/Advertising.php(54): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)

This mi php version:
$ /software/apache/software/php/bin/php -v

PHP 5.5.8 (cli) (built: Jun 18 2015 12:44:25)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies


This is the BBDD update ouput:

$ /software/apache/software/php/bin/php /software/apache/www/estadisticas/console core:update

*** Update ***

Database Upgrade Required

Your Piwik database is out-of-date, and must be upgraded before you can continue.

Piwik database will be upgraded from version 2.15.0 to the new version 2.16.0.

The following plugins will be updated: LanguagesManager.

*** Note: this is a Dry Run ***

ALTER TABLE `piwik_user_language` ADD COLUMN `use_12_hour_clock` TINYINT(1) NOT NULL DEFAULT 0 AFTER `language`;

*** End of Dry Run ***

A database upgrade is required. Execute update? (y/N) y

Starting the database upgrade process now. This may take a while, so please be patient.

*** Update ***

Database Upgrade Required

Your Piwik database is out-of-date, and must be upgraded before you can continue.

Piwik database will be upgraded from version 2.15.0 to the new version 2.16.0.

The following plugins will be updated: LanguagesManager.

The database upgrade process may take a while, so please be patient.

Executing ALTER TABLE piwik_user_language ADD COLUMN use_12_hour_clock TINYINT(1) NOT NULL DEFAULT 0 AFTER language... Done. [1 / 1]


Piwik has been successfully updated!


[apache@glwebd01 www]$ /software/apache/software/php/bin/php /software/apache/www/estadisticas/console core:update


Everything is already up to date.



The piwick web console shows:
WARNING: /software/apache/www/estadisticas/core/Config.php(161): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)

WARNING: /software/apache/www/estadisticas/core/PiwikPro/Advertising.php(54): Notice - Undefined index: piwik_pro_ads_enabled - Piwik 2.16.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)

@jgrisa
Copy link
Author

jgrisa commented Feb 9, 2016

Solution:
on config/config.ini.php
enable de value of var piwik_pro_ads_enabled

piwik_pro_ads_enabled = 0
or
piwik_pro_ads_enabled = 1

example

[General]
release_channel = "latest_2x_stable"
salt = "4fe0737XXXXXXXXXXXXXX"
trusted_hosts[] = "webstats.destest.com"

piwik_pro_ads_enabled = 0

@sgiehl
Copy link
Member

sgiehl commented Feb 9, 2016

This should not be required, as a default value should be defined in global.ini.php (https://github.com/piwik/piwik/blob/master/config/global.ini.php#L567)
Maybe this file wasn't properly updated in your case? Would you mind checking if the value is set in your global.ini.php

@jgrisa
Copy link
Author

jgrisa commented Feb 9, 2016

I have activated this variable and it works fine. I noticed that it wasn't
activatet at my old config.ini.php, now it is up to date.

Thanks a lot !

2016-02-09 13:50 GMT+01:00 Stefan Giehl notifications@github.com:

This should not be required, as a default value should be defined in
global.ini.php (
https://github.com/piwik/piwik/blob/master/config/global.ini.php#L567)
Maybe this file wasn't properly updated in your case? Would you mind
checking if the value is set in your global.ini.php


Reply to this email directly or view it on GitHub
#9736 (comment).

@sgiehl
Copy link
Member

sgiehl commented Feb 9, 2016

Would be nice to investigate the reason. As mentioned in my comment before, it would be good if you could have a look at your global.ini.php. The variable should be set there. If not, something went wrong during the update.

@jgrisa
Copy link
Author

jgrisa commented Feb 9, 2016

Helo Again

As I my root folder is caled "webstats" instead of "piwik", I can't
upgrade by the normal mode. (by unzip -o piwik.zip)
My previus piwik was 2.15.00 version.
First I do a backup of config.ini.php and global.ini.php

So I unziped the piwik.zip (2.16.00) file, on a temporary directory (

  • /software/apache/tmp/piwik*).
    Then I went to that temporary path, and copy the new content:
  • cd /software/apache/tmp*
  • unzip piwik.zip*
  • cd /software/apache/tmp/piwik*
  • cp -rpf * /software/apache/www/webstats *

then i restore both files (config.ini.php and global.ini.php)

Maybe, that is the reason why that variable is not in my config...

There was another missing variable in global.ini.php file

; Whether to force a new visit at midnight for every visitor. Default 1.
create_new_visit_after_midnight = 1

Maybe is a new varible of 2.16.00 version ....

Thanks a lot ( and sorry for my english)

😢

JL

2016-02-09 16:57 GMT+01:00 Stefan Giehl notifications@github.com:

Would be nice to investigate the reason. As mentioned in my comment
before, it would be good if you could have a look at your global.ini.php.
The variable should be set there. If not, something went wrong during the
update.


Reply to this email directly or view it on GitHub
#9736 (comment).

@tsteur
Copy link
Member

tsteur commented Feb 10, 2016

You should not backup global.ini.php. It should be updated with the update instead.

@tsteur tsteur closed this as completed Feb 10, 2016
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Feb 10, 2016
@tsteur tsteur added this to the 2.16.1 milestone Feb 10, 2016
@tsteur tsteur self-assigned this Feb 10, 2016
@jgrisa
Copy link
Author

jgrisa commented Feb 10, 2016

Sorry Thomas, but I think, you are wrong. we need set the section [proxy]:
in* config/global.ini.php*

example:

[proxy]
type = BASIC ; proxy type for outbound/outgoing connections; currently,
only BASIC is supported
host = 172.122.122.122 ; Proxy host: the host name of your proxy server
(mandatory)
port = 8080; Proxy port: the port that the proxy server listens to. There
is no standard default, but 80, 1080, 3128, and 8080 are popular
username = ; Proxy username: optional; if specified, password is mandatory
password = ; Proxy password: optional; if specified, username is mandatory

As we need a proxy for navigation, updates, etc.
If we overwrite this file with an update, those changes are going to be
lossed, so a backup is required.

JL

2016-02-10 9:35 GMT+01:00 Thomas Steur notifications@github.com:

You should not backup global.ini.php. It should be updated with the
update instead.


Reply to this email directly or view it on GitHub
#9736 (comment).

@tsteur
Copy link
Member

tsteur commented Feb 10, 2016

You should set it in config.ini.php

@RMastop
Copy link
Contributor

RMastop commented Feb 10, 2016

Global.ini.php is the blueprint for all general settings.
The settings will be overwritten by the settings in config.ini.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

4 participants