#3328 closed Bug (fixed)

Error when creating new dashboard

Reported by: DnSL48 Owned by:
Priority: normal Milestone:
Component: Core Keywords: dashboard
Cc: Sensitive: no


Piwik version 1.8.3. Database version MySQL 5.x

For new users, who doesn't have any existent dashboards in a database table prefix_user_dashboard, attempt to create a new dashboard leads to an error.

Piwik_Dashboard_Controller::createNewDashboard method has sql query (183 line of the file) 'SELECT MAX(iddashboard)+1 FROM '.Piwik_Common::prefixTable('user_dashboard').' WHERE login = ?". Unfortunately this returns NULL value, when table doesn't have any records by this conditions. After that we are have a next query on line 194, which throws an error, when receives a null-value in $nextId variable.

Attachments (1)

patch_#3328.txt (59 bytes) - added by DnSL48 20 months ago.
Patch to fix this issue

Download all attachments as: .zip

Change History (2)

Changed 20 months ago by DnSL48

Patch to fix this issue

comment:1 Changed 20 months ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [6801]) Fixes #3328 Thanks DnSL48 for report and patch!

Note: See TracTickets for help on using tickets.