zotonic/zotonic — Issue #255: module won't enabled, if not present in table modules
Author: helllamer
Created: 2011-11-09 07:15:15+00:00
State: open

Steps to reproduce:

1. Remove row from table 'module'. For example: z_db:q1("DELETE FROM modules WHERE name = 'mod_signal'", Context);

2. z:restart().

3. Go to admin/modules

4. Enable the mod_signal

Expected result: module will be enabled.

Result: module silently not enabled, without any errors.

Of course, nobody will remove module by hands. But i've observed such problem couple of times between zotonic upgrades on production. In other words, module row may not exist in DB after upgrade, so i cannot enable it without "INSERT INTO module...".