Archiv Cronjob Error since Upgrade to 1.2 [SOLVED]

bash-3.2$ /www/piwik/htdocs/piwik/misc/cron/archive.sh

There is an error. Please report the message and full backtrace in the Piwik forums.

        Notice: Undefined index: Segments in /www/piwik/htdocs/piwik-1.2/core/Config.php on line 336

Backtrace -->#0 Piwik_ErrorHandler(8, Undefined index: Segments, /www/piwik/htdocs/piwik-1.2/core/Config.php, 336, Array ([name] => Segments)) called at [/www/piwik/htdocs/piwik-1.2/core/Config.php:336]#1 Piwik_Config->__get(Segments) called at [/www/piwik/htdocs/piwik-1.2/plugins/CoreAdminHome/API.php:42]#2 Piwik_CoreAdminHome_API->getKnownSegmentsToArchive()#3 call_user_func_array(Array ([0] => Piwik_CoreAdminHome_API Object (),[1] => getKnownSegmentsToArchive), Array ()) called at [/www/piwik/htdocs/piwik-1.2/core/API/Proxy.php:156]#4 Piwik_API_Proxy->call(Piwik_CoreAdminHome_API, getKnownSegmentsToArchive, Array ([token_auth] => ffa601fa9623aaa2bf4457b83ead3cae,[–] => ,[module] => API,[method] => CoreAdminHome.getKnownSegmentsToArchive,[format] => csv,[convertToUnicode] => 0,[filter_limit] => 50)) called at [/www/piwik/htdocs/piwik-1.2/core/API/Request.php:121]#5 Piwik_API_Request->process() called at [/www/piwik/htdocs/piwik-1.2/plugins/API/Controller.php:27]#6 Piwik_API_Controller->index()#7 call_user_func_array(Array ([0] => Piwik_API_Controller Object ([] => API,[] => ,[] => ,[] => 0,[] => Piwik_Site Object ([] => 0)),[1] => index), Array ()) called at [/ww w/piwik/htdocs/piwik-1.2/core/FrontController.php:125]#8 Piwik_FrontController->dispatch() called at [/www/piwik/htdocs/piwik-1.2/index.php:57]

PHP Fatal error: Call to a member function toArray() on a non-object in /www/piwik/htdocs/piwik-1.2/plugins/CoreAdminHome/API.php on line 42

Any Idee ?

Na dann teile uns doch bitte mit, was genau in Zeile 336 der Config.php steht…


/**
         * Called when getting a configuration value, eg. Zend_Registry::get('config')->superuser->login
         *
         * @param string $name
         * @return mixed value
         *
         * @throws exception if the value was not found in the configuration file
         */
public function __get($name)
        {
                if(empty($this->cachedConfigArray))
                {
                        $this->cacheConfigArray();
                }
                return $this->cachedConfigArray[$name];  <- Zeile 336

Das ist das Default File aus dem Zip, ich hab nichts geändert an dem File, ist ja im Prinzip auch kein Config File für Anpassungen.

As i can see Matt “fixed” the problem in SVN 9 Days ago, but the files at the download zip are exact the same as in the svn repository.

http://dev.piwik.org/trac/changeset/3962#file0

But as you can see I still have these strange outputs.

Sorry, mein Fehler. Hatte es beim Überfliegen für die konfigurationsDatei gehalten.

Hast du überhaupt Segmente definiert, oder verwendest du das Feature gar nicht?

Bitte versuche mal, die vorhandene global.ini.php im Ordner piwik/config/ gegen die aus dem Download-Paket der 1.2-Version zu ersetzen. Bitte vorher ein Backup der vorhandenen Datei machen.

Kaum macht man es richtig klappt es auch :wink:

Okay der komplette Eintrag hat gefehlt, da ich die vom 1.1.1er Release mitkopiert hatte.


[Segments]
; Reports with segmentation in API requests are processed in real time.
; On high traffic websites it is recommended to pre-process the data
; so that the analytics reports are always fast to load.
; You can define below the list of Segments strings
; for which all reports should be Archived during the cron execution
; All segment values MUST be URL encoded.
;Segments[]="visitorType==new"
;Segments[]="visitorType==returning"

; If you define Custom Variables for your visitor, for example set the visit type
;Segments[]="customVariableName1==VisitType;customVariableValue1==Customer"

Jetzt läuft es wieder :wink:

Hi

Can explain in english? Please…

Simple fix was that i forgot to copy the piwik/config/global.ini.php from the zip file, that was causing the error or just add the [Segments] part from this post to the global.ini.php and the error was gone.

[quote=Belgeron]
Simple fix was that i forgot to copy the piwik/config/global.ini.php from the zip file, that was causing the error or just add the [Segments] part from this post to the global.ini.php and the error was gone.[/quote]

Thanks much