After upgrade to 0.5.2 evrything wrong

Hi,
i’ve made an upgrade from 0.5.1 to 0.5.2 in the morning. Now i get on every page and every widget the same error message:

Fatal error: Cannot use object of type Piwik_DataTable_Row as array in /path/to/piwik/plugins/Actions/Actions.php on line 380

Guido

same problem here, but since the 5.1 update. 5.2 update did not fix this error.

I tried: sh /path/to/piwik/misc/cron/archive.sh

Fatal error: Cannot use object of type Piwik_DataTable_Row as array in /var/www/html/plugins/Actions/Actions.php on line 362

So the problem is not browser related.

I ues automatic method to update from 0.5.0 to 0.5.2 and everything is ok.

Hi,
I’ve also used the internal upgrade function. After the problem occurs, I’ve tried a completely new installation (all files in the piwik directory deleted, new files copied). Same problem.

Guido

Hi,

I afraid I don’t have any kind of solution for this problem (Cannot use object of type Piwik_DataTable_Row as array in … Actions.php), but I have some more (unanalysed) details:

  • I’m faceing the same problem since a manual upgrade from 0.4.5 to 0.5 (and still face it since I’ve upgraded to 0.5.3 today):
    after coping the new piwikfiles to a clean directory on my webserver I tried to start the upgrade procedure via browser. But this did not work, the script seemed do do nothing. So I’ve updated my tables manual to (took the sql from core/Updates/…)

  • the problem is not browserspecific, since it can be observed within the archivescript, too:
    archive.sh
    PHP Fatal error: Cannot use object of type Piwik_DataTable_Row as array in /…/id/piwik/plugins/Actions/Actions.php on line 380

Fatal error: Cannot use object of type Piwik_DataTable_Row as array in /…/piwik/plugins/Actions/Actions.php on line 380

  • since the archivescript dosen’t work I could run the archive-cronjobs and my DB-tables growed massively over the last days. I had to remove the piwik-pixel from our pages. :frowning:

  • Interesting observation: If I choose a date before the upgrade, that’s look at old data, all widgets work great. Only new data is affected by this bug.

Any ideas?

bye

IchBins

Hmmm, after disableing and reenableing the action-plugin the errormessages are gone. But now I have no data in “actions/pages” and/or “actions/page title”.

the archve-script runs extremely fast and produces a notice followed by an backtrace:


Notice: Array to string conversion in /..../piwik/core/Log.php on line 169

Backtrace -->#0 [...]

Not that nice…:frowning:

bye

IchBins

IchBins: The second issue is now fixed in svn. http://dev.piwik.org/trac/changeset/1716

What version of PHP are you running?

I’ve created a ticket for this: http://dev.piwik.org/trac/ticket/1082

Assuming you have the default settings (browser-triggered archiving), disabling the Actions plugin would have resulted in archives generated without calling the hooks in the Actions plugin. That’s why you have no data.

Assuming you aren’t pruning your log_visit table, to regenerate the archives, you have to activate the Actions plugin, and manually drop the archive_blob and archive_numeric tables (or delete specific rows) for the desired period.

This seems to be data-specific. Would you mind changing line 380 of plugins/Actions/Actions.php, from:

    $currentTable =& $currentTable[$actionName];

to:

    if(is_array($currentTable)) {
        $currentTable =& $currentTable[$actionName];
    }
    else
    {
        var_dump($this->actionsTablesByType[$row['type']]);
        var_dump($currentTable);
        var_dump($actionExplodedNames);
        var_dump($row['type']);
        die;
    }

and report back to us the debug output? Thanks.

(t4b: let me know if you need help making a similar change around line 362)

Hi vipsoft,

first of all, thanks for the fast fix regarding the second problem. I’ve applied it to my archive.sh and…there is the first problem again, fine. :slight_smile:

I’m using php 5.2.9. And yes, it seems that I’ve lost my enable_browser_archiving_triggering = false during the updateprocess, so the default configuration is active currently.

And last, but not least the debug output from the modified Action.php (same on dashboard and from archive.sh):

NULL NULL array(1) { [0]=> string(20) “page url not defined” } NULL

Thanks!

bye

markus

array(2) 
{ 
  ["/index"]=>  object(Piwik_DataTable_Row)#190 (1) 
  { 
    ["c"]=>  array(3) 
    { 
      [0]=>  array(4) 
      { 
        ["label"]=>  string(6) "/index" 
        ["nb_visits"]=>  string(2) "67" 
        ["nb_uniq_visitors"]=>  string(2) "66" 
        ["nb_hits"]=>  string(3) "107" 
      } 
      [1]=>  array(1) 
      { 
        ["url"]=>  string(27) "http://www.domain.tld/" 
      } 
      [3]=>  NULL 
    } 
  } 
  ["kosmetik"]=>  &NULL 
} 

NULL 

array(2) 
{ 
  [0]=>  string(8) "kosmetik" 
  [1]=>  string(6) "studio" 
} 

 string(1) "1"

After an Upgrade to 0.5.3 i get no longer the error message from above. For the dates 2009-12-14 and 2009-12-15 I see for the statistic Actions > Pages the message “No data for this table.”. For today (2009-12-16) I get data and statistics. So maybe the reason for the problems on 2009-12-14 and 2009-12-15 are some corrupt data in the database?

Guido

P.S.: Since I tried to regenerate the archivetables for december 2009 (with enabled action plugin) all widgets show the above errormessage.

bye

markus

Just for your information: I updated from 0.5.2 to 0.5.3, the error is the same.

In the ‘last visits graph’ for example:

Fatal error: Cannot use object of type Piwik_DataTable_Row as array in /var/www/html/plugins/Actions/Actions.php on line 362

Please say if I can help with any debugging.

one hint: the problem exists only for the first tracked page, the statistics for the other four sites don’t show this error.

I’ve changed nothing on the system since my posting in the morning. But now i get the same error for todays statistics: “Fatal error: Cannot use object of type Piwik_DataTable_Row as array in /homepages/26/d283610669/htdocs/app/webroot/stat/plugins/Actions/Actions.php on line 380”

Guido

I wasn’t able to replicate but I added a sanity check, can you please apply the patch to your Piwik and see if it now works without error?

http://dev.piwik.org/trac/changeset/1721

Hi,

I’ve made an upgrade to 0.5.4 in the morning. As I saw the patch is included in that version.

Statistics (Visitors, Refererers, Goals, …) for everything in the past are working, except the Actions statistics for the current month (12/2009). Error message “No data for this table.” (No matter if i select day, week or month as period).

If I select the day statistics for today, then i get on every statistic/widget “Fatal error: Cannot use object of type Piwik_DataTable_Row as array in /path/to/piwik/plugins/Actions/Actions.php on line 385”. If i deactivate the Actions plugin, then every other statistic for today works fine.

I have already deleted the tables piwik_archive_blob_2009_12 and piwik_archive_numeric_2009_12 to rebuild these tables, but that was not helpful.

Thank you for the support.

Guido

Actually i have the same Error with 0.5.4:

/var/www/stat/htdocs/piwik/misc/cron/archive.sh

Fatal error: Cannot use object of type Piwik_DataTable_Row as array in /var/www/stat/htdocs/piwik/plugins/Actions/Actions.php on line 385

PHP Version is: 5.2.11

When you updated to 0.5.4 and still experience the issue, can you please do the following.

Change line 385 of plugins/Actions/Actions.php, from:

    $currentTable =& $currentTable[$actionName];

to:

    if(!is_object($currentTable)) {
        $currentTable =& $currentTable[$actionName];
    }
    else
    {
echo 'actionsTablesByType';
        var_dump($this->actionsTablesByType[$row['type']]);
echo 'currentTable';
        var_dump($currentTable);
echo 'actionExplodedNames';
        var_dump($actionExplodedNames);
echo 'row';
        var_dump($row);
die;

    }

and report back to us the debug output, wrapped in CODE tags? Thanks.

The Debug Output is 1,8 GB in a Log file (via > director under Linux).
I think this is to many for this Board . . .

Link: (it is a 48 MByte bz2 Archive)

//Iam not allowed to Post Links, Site: www.maxknax.net File: /forum/archive.log.bz2

edit2: Funny is: Now i have Statistics Calculated