Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2684 closed Bug (fixed)

Handle missing config file setting with a clean error message

Reported by: tthuermer Owned by:
Priority: normal Milestone: 1.6 Piwik 1.6
Component: Core Keywords: branding logo
Cc: Sensitive: no


when the branding section is missing from config.ini.php, piwik generates mutliple screens full of errors/backtraces (due to objects in the config object not existing), this should be handled more gracefully, or at least generate a meaningful error message.
happened to me after an upgrade from 1.4 to 1.5.1. (not necessarily the upgrade processes' fault tho')

Change History (4)

comment:1 Changed 3 years ago by matt (mattab)

  • Milestone set to 1.6 Piwik 1.6
  • Summary changed from handle missing config.ini.php.ini branding session better to Handle missing config file setting with a clean error message

I tried replicate the issue (remove branding from global.ini.php or from config.ini.php) but I couldnt see error messages. Can you please explain how to reproduce the bug?

comment:2 Changed 3 years ago by matt (mattab)

I could reproduce the bug. thanks for the report!

comment:3 Changed 3 years ago by matt (mattab)

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

(In [5253]) Fixes #2684 Now displaying clean error message with probably explanation and suggestion on how to fix the problem (ie. reupload global.ini.php )

comment:4 Changed 3 years ago by tthuermer

good work, thanks!
(i'd agree this is a somewhat obscure situation, but i see not much code is needed to handle it better)

btw, i as far as i can tell the root cause was that i tried to replace the config directory with a symlink to one outside the piwik directory (to make (manual) upgrading smoother), which got replaced with a blank new directory during the upgrade(?), and then put the link (to the non-upgraded copy) back.
i guess it'd be better to only link config.ini.php then...

Note: See TracTickets for help on using tickets.