Skip to content

When database connection fails, display a useful and clean page to user #5400

Description

@mattab

Currently when the database connection cannot be established, the following message is displayed:

The Piwik configuration file couldn't be found and you are trying to access a Piwik page.
You can install Piwik now
If you installed Piwik before and have some tables in your DB, don't worry, you can reuse the same tables and keep your existing data!

This was a regression introduced in 2.3.0.

The goal of this ticket is to provide all Piwik users a pleasant experience in the tragic time where Piwik instance doesnt' work as expected.

Tasks

  • When DB connection fails display a simple error page with function Piwik_ExitWithMessage and showing info such as:
    • Error msg from Mysql eg. "SQLSTATE[2003 Can't connect to MySQL server on 'analytics.db.company.net' (111)"
    • "It may have been a temporary issue, try <a>refresh the page</a>"
    • "If the problem persists please contact your Piwik administrator."
  • Add screenshot test for "failed database connection" to check we don't regress

Activity

  1. diosmosis commented on Jul 4, 2014

    @diosmosis
    Member

    In 080829b: Fixes #5400, display useful error message when a database connection cannot be achieved. Deprecating Config.badConfigurationFile event.

  2. diosmosis commented on Jul 4, 2014

    @diosmosis
    Member

    In 412dc71: Refs #5400, fixing UI tests and regression in Installation process.

  3. added this to the milestone on Jul 8, 2014
  4. added 2 commits that reference this issue on Jul 9, 2014
    080829b
    412dc71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions