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

Column nb_visits already in the array #5566

Closed
anonymous-matomo-user opened this issue Mar 15, 2008 · 17 comments
Closed

Column nb_visits already in the array #5566

anonymous-matomo-user opened this issue Mar 15, 2008 · 17 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@anonymous-matomo-user
Copy link

I found ticket #140 and I have the same error. I didn’t modify the database. However, this should probably be logged under a different ticket, but there isn’t a create tables script for those of us who don’t have permissions to create tables.

I am using:
Linux uawww.domain.com 2.6.18-53.1.4.el5 #1 SMP Fri Nov 30 00:45:16 EST 2007 i686 athlon i386 GNU/Linux

php -v
PHP 5.1.6 (cli) (built: Sep 20 2007 10:16:10)
Copyright © 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright © 1998-2006 Zend Technologies

mysql —help
mysql Ver 14.12 Distrib 5.0.22, for redhat-linux-gnu (i686) using readline 5.0

  1. /var/www/html/piwik/plugins/Actions/Actions.php(265): Piwik_DataTable_Row→addColumn(‘nb_visits’, ‘1’)
  2. /var/www/html/piwik/plugins/Actions/Actions.php(111): Piwik_Actions→updateActionsTableWithRowQuery(Object(Zend_Db_Statement_Pdo))
  3. [function](internal): Piwik_Actions→archiveDay(Object(Event_Notification))
  4. /var/www/html/piwik/libs/Event/Dispatcher.php(280): call_user_func_array(Array, Array)
  5. /var/www/html/piwik/libs/Event/Dispatcher.php(250): Event_Dispatcher→postNotification(Object(Event_Notification), true, false)
  6. /var/www/html/piwik/modules/PluginsManager.php(422): Event_Dispatcher→post(Object(Piwik_ArchiveProcessing_Day), ‘ArchiveProcessi…’, Array, true, false)
  7. /var/www/html/piwik/modules/ArchiveProcessing/Day.php(69): Piwik_PostEvent(‘ArchiveProcessi…’, Object(Piwik_ArchiveProcessing_Day))
  8. /var/www/html/piwik/modules/ArchiveProcessing.php(237): Piwik_ArchiveProcessing_Day→compute()
  9. /var/www/html/piwik/modules/Archive/Single.php(80): Piwik_ArchiveProcessing→loadArchive()
  10. /var/www/html/piwik/modules/Archive/Single.php(117): Piwik_Archive_Single→prepareArchive()
  11. /var/www/html/piwik/modules/Archive/Single.php(306): Piwik_Archive_Single→get(‘UserSettings_pl…’, ‘blob’)
  12. /var/www/html/piwik/plugins/UserSettings/API.php(108): Piwik_Archive_Single→getDataTable(‘UserSettings_pl…’)
  13. [function](internal): Piwik_UserSettings_API→getPlugin(‘1’, ‘day’, ‘2008-03-15’)
  14. /var/www/html/piwik/modules/API/Proxy.php(462): call_user_func_array(Array, Array)
  15. [function](internal): Piwik_API_Proxy→__call(‘getPlugin’, Array)
  16. [function](internal): Piwik_API_Proxy→getPlugin(‘1’, ‘day’, ‘2008-03-15’)
  17. /var/www/html/piwik/modules/API/Request.php(140): call_user_func_array(Array, Array)
  18. /var/www/html/piwik/modules/ViewDataTable.php(352): Piwik_API_Request→process()
  19. /var/www/html/piwik/modules/ViewDataTable/Html.php(45): Piwik_ViewDataTable→loadDataTableFromAPI()
  20. /var/www/html/piwik/modules/Controller.php(43): Piwik_ViewDataTable_Html→main()
  21. /var/www/html/piwik/plugins/UserSettings/Controller.php(114): Piwik_Controller→renderView(Object(Piwik_ViewDataTable_Html), true)
  22. /var/www/html/piwik/plugins/UserSettings/Controller.php(11): Piwik_UserSettings_Controller→getPlugin(true)
  23. [function](internal): Piwik_UserSettings_Controller→index()
  24. /var/www/html/piwik/modules/FrontController.php(119): call_user_func_array(Array, Array)
  25. /var/www/html/piwik/index.php(62): Piwik_FrontController→dispatch()
  26. {main}
@mattab
Copy link
Member

mattab commented Mar 17, 2008

does it happen when you select every day?
can you give me access to this webserver so I can try to find the bug?

@anonymous-matomo-user
Copy link
Author

I get the same error a couple of hours after installing. Please contact me if you like access to our server.

@anonymous-matomo-user
Copy link
Author

Sorry… Perhaps an emailadress would make it easier to contact me: david@newsdesk.se

@anonymous-matomo-user
Copy link
Author

I had to take piwik offline. After 1 full day of traffic, pulling up any reports took over 5 minutes.

I’m anxious to use it, but the site I’m trying to put it in gets over 5k uniques per day. I had similar luck with phpOpenTracker – just an exorbanant amount of data to track.

@anonymous-matomo-user
Copy link
Author

There are currently no indexes on the log tables. I tried to add a few and that made all the difference for me:

CREATE INDEX index_idvisit ON log_link_visit_action (idvisit);
CREATE INDEX index_idaction ON log_action (idaction);
CREATE INDEX index_idsite ON log_visit (idsite);
CREATE INDEX index_visit_server_date ON log_visit (visit_server_date);

Replying to [droidmcse](comment:4):

> I had to take piwik offline. After 1 full day of traffic, pulling up any reports took over 5 minutes.
>
> I’m anxious to use it, but the site I’m trying to put it in gets over 5k uniques per day. I had similar luck with phpOpenTracker – just an exorbanant amount of data to track.

@anonymous-matomo-user
Copy link
Author

Ok – I put it back online since I got the indexes. I realize that it’s a separate issue.

Ok so I am not 100% positive that this won’t bite me in the rear, but my site is:
www.toolsource.com/piwik
username: piwik
password: P1w1k1

@mattab
Copy link
Member

mattab commented Mar 18, 2008

droidmcse, you should not give passwords to everybody!

I will study the index strategy add add them before the beta

@mattab
Copy link
Member

mattab commented Mar 19, 2008

It seems the bug is fixed in the last version. I tried on david box and it works well.

@anonymous-matomo-user
Copy link
Author

Using r391.

When accessing index.php without parameters, all widgets except “Last visits graph” display data (no crash, last visits is just empty, probably because Piwik hasn’t been able to record anything).

However, if I change to a specific day/week/year, I get this:

```
Uncaught exception: ‘Column nb_visits already in the array!’
More information

In /home/.yana/mikael/mikael.jansson.be/piwik/modules/DataTable/Row.php on line 270
Backtrace:

  1. /home/.yana/mikael/mikael.jansson.be/piwik/plugins/Actions/Actions.php(293): Piwik_DataTable_Row→addColumn(‘nb_visits’, ‘1’)
  2. /home/.yana/mikael/mikael.jansson.be/piwik/plugins/Actions/Actions.php(121): Piwik_Actions→updateActionsTableWithRowQuery(Object(Zend_Db_Statement_Pdo))
  3. /home/.yana/mikael/mikael.jansson.be/piwik/libs/Event/Dispatcher.php(280): Piwik_Actions→archiveDay(Object(Event_Notification))
  4. /home/.yana/mikael/mikael.jansson.be/piwik/libs/Event/Dispatcher.php(250): Event_Dispatcher→postNotification(Array, Array)
  5. /home/.yana/mikael/mikael.jansson.be/piwik/modules/PluginsManager.php(445): Event_Dispatcher→post(Object(Event_Notification), true, false)
  6. /home/.yana/mikael/mikael.jansson.be/piwik/modules/ArchiveProcessing/Day.php(69): Piwik_PostEvent()
  7. /home/.yana/mikael/mikael.jansson.be/piwik/modules/ArchiveProcessing.php(237): Piwik_ArchiveProcessing_Day→compute(Object(Piwik_ArchiveProcessing_Day), ‘ArchiveProcessi…’, Array, true, false)
  8. /home/.yana/mikael/mikael.jansson.be/piwik/modules/Archive/Single.php(80): Piwik_ArchiveProcessing→loadArchive(‘ArchiveProcessi…’, Object(Piwik_ArchiveProcessing_Day))
  9. /home/.yana/mikael/mikael.jansson.be/piwik/modules/ArchiveProcessing.php(387): Piwik_Archive_Single→prepareArchive()
  10. /home/.yana/mikael/mikael.jansson.be/piwik/modules/ArchiveProcessing.php(233): Piwik_ArchiveProcessing→loadSubperiodsArchive()
  11. /home/.yana/mikael/mikael.jansson.be/piwik/modules/Archive/Single.php(80): Piwik_ArchiveProcessing→loadArchive()
  12. /home/.yana/mikael/mikael.jansson.be/piwik/modules/Archive/Single.php(117): Piwik_Archive_Single→prepareArchive()
  13. /home/.yana/mikael/mikael.jansson.be/piwik/modules/Archive/Single.php(306): Piwik_Archive_Single→get()
  14. /home/.yana/mikael/mikael.jansson.be/piwik/plugins/VisitorInterest/API.php(40): Piwik_Archive_Single→getDataTable()
  15. /home/.yana/mikael/mikael.jansson.be/piwik/modules/API/Proxy.php(462): Piwik_VisitorInterest_API→getNumberOfVisitsPerVisitDuration(‘VisitorInterest…’, ‘blob’)
  16. [internal function]: Piwik_API_Proxy→__call(‘VisitorInterest…’)
  17. /home/.yana/mikael/mikael.jansson.be/piwik/modules/API/Request.php(140): Piwik_API_Proxy→getNumberOfVisitsPerVisitDuration(‘1’, ‘month’, ‘2008-03-18’)
  18. /home/.yana/mikael/mikael.jansson.be/piwik/modules/ViewDataTable.php(365): Piwik_API_Request→process(Array, Array)
  19. /home/.yana/mikael/mikael.jansson.be/piwik/modules/ViewDataTable/Cloud.php(44): Piwik_ViewDataTable→loadDataTableFromAPI(‘getNumberOfVisi…’, Array)
  20. /home/.yana/mikael/mikael.jansson.be/piwik/modules/Controller.php(43): Piwik_ViewDataTable_Cloud→main(‘1’, ‘month’, ‘2008-03-18’)
  21. /home/.yana/mikael/mikael.jansson.be/piwik/plugins/VisitorInterest/Controller.php(32): Piwik_Controller→renderView(Array, Array)
  22. /home/.yana/mikael/mikael.jansson.be/piwik/modules/FrontController.php(122): Piwik_VisitorInterest_Controller→getNumberOfVisitsPerVisitDuration()
  23. /home/.yana/mikael/mikael.jansson.be/piwik/index.php(62): Piwik_FrontController→dispatch()
  24. {main}
    ```

@mattab
Copy link
Member

mattab commented Mar 19, 2008

Please enable

```

always_archive_data = true
```

in your config/global.ini.php
under the

```
[Debug]
```

section. try to archive your data again, does it work better?
If not send me SSH or FTP access to your piwik installation with write access to your piwik files by email. thanks

@anonymous-matomo-user
Copy link
Author

Replying to [matt](comment:10):

> Please enable
>
> ```
>
> always_archive_data = true
> ```
>
> in your config/global.ini.php
> under the
>
> ```
> [Debug]
> ```
>
> section. try to archive your data again, does it work better?

This is what I’m doing:
1. Go to http://thesite/piwik/index.php
2. Data is displayed for the day
3. Click on “week”
4. Exceptions.

I’m not doing any archiving operation.

> If not send me SSH or FTP access to your piwik installation with write access to your piwik files by email. thanks

Hah, as if!

However, if you tell me what data you need to make a minimal test case, I can provide it for you.

@anonymous-matomo-user
Copy link
Author

This seems indeed only be happening when I change to another view than day. It still seems to be recording visits, which is good, as the “visit by server time” graph works. The “Last visit graph” is broken, though.

Any ideas on how I can go about debugging this?

@anonymous-matomo-user
Copy link
Author

I have exactly the same issue – Uncaught exception: ‘Column nb_visits already in the array!’

I’ve just tried the latest piwik download today but it does not fix anything.

I’ve tried adding the indexes as suggested above without result, and also changing always_archive_data to true also without result.

Any further suggestions? If I can provide any more info let me know as I’m keen to help this project if I can!

@mattab
Copy link
Member

mattab commented Mar 20, 2008

The easiest way to help in this case would be to give me access to your piwik files (ftp or ssh) so I can debug. I promise I won’t do anything harmful of course.

@anonymous-matomo-user
Copy link
Author

Replying to [matt](comment:14):

> The easiest way to help in this case would be to give me access to your piwik files (ftp or ssh) so I can debug. I promise I won’t do anything harmful of course.

I can give you the revision of piwik I’m using plus an SQL dump of the piwik tables.

@mattab
Copy link
Member

mattab commented Mar 20, 2008

mjbe, please send me your SQL dump at matthieu at piwik .org
thanks

@mattab
Copy link
Member

mattab commented Mar 22, 2008

(In 395) – fix #5566 Column nb_visits already in the array
thanks to all for your help! :)
- refs #5453 working on this…
- split the Record_\* classes into several files

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants