1

Topic: jinja2.exceptions.UndefinedError at /profile/domain/general/bbb.com

another issue while trying to create or modify a domain from iredadmin pro i got this error from debug

jinja2.exceptions.UndefinedError at /profile/domain/general/bbb.com
'Storage' object has no attribute 'defaultuseraliases'
Python     /usr/lib64/python2.4/site-packages/jinja2/environment.py in getattr, line 349
Web     GET https://172.16.17.188/iredadmin/profile … al/bbb.com

2

Re: jinja2.exceptions.UndefinedError at /profile/domain/general/bbb.com

It complains you don't have SQL column "domain.defaultuseraliases" (and column "admin.name" in your another forum post) in MySQL database.

May i know which version of iRedMail you're running?
the latest iRedAdmin-Pro-MySQL-1.3.1 requires iRedMail-0.7.4 stable release, if you're not running v0.7.4, please upgrade it first.

3

Re: jinja2.exceptions.UndefinedError at /profile/domain/general/bbb.com

To fix it quickly:

$ mysql -uroot -p
mysql> USE vmail;
mysql> ALTER TABLE admin ADD COLUMN defaultuseraliases TEXT NOT NULL DEFAULT '';

But it's strongly recommended to upgrade your iRedMail to the latest stable release, iRedMail-0.7.4. Upgrade tutorials are available here: http://www.iredmail.org/doc.html

4 (edited by spyooo7 2012-02-02 18:43:19)

Re: jinja2.exceptions.UndefinedError at /profile/domain/general/bbb.com

im running last iredmail version 0.7.4 and last iredadmin pro after fixing the issue of the sql u gave it to me , the problem still exist while trying to add new domain name from iredadmin or editing  the profile of domain here is the debug info


jinja2.exceptions.UndefinedError at /profile/domain/general/xxxx.com
'Storage' object has no attribute 'defaultuseraliases'
Python     /usr/lib64/python2.4/site-packages/jinja2/environment.py in getattr, line 349
Web     GET https://172.16.17.252/iredadmin/profile … l/xxxx.com

5

Re: jinja2.exceptions.UndefinedError at /profile/domain/general/bbb.com

Oops, my mistake. The table name must be 'domain', not 'admin. So the correct SQL command is:

mysql> USE vmail;
mysql> ALTER TABLE domain ADD COLUMN defaultuseraliases TEXT NOT NULL DEFAULT '';

And drop the incorrect column which added by mistake:

mysql> USE vmail;
mysql> ALTER TABLE admin DROP COLUMN defaultuseraliases;

So sorry about my mistake.