Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

GM 2.0.1 Admin Email Bug

Quote Reply
GM 2.0.1 Admin Email Bug
Admin -> Users -> List All -> Email Link next to user

Hi,

I have removed the 'default' template set, and have renamed the simple to now be the default folder - this is also set to the default in the misc preferences in the admin area.

But when I got to click on the 'email' link in the admin area next to the users name, it gives me the following error, which looks like it's still trying to call the simple template set for reason directly:


A fatal error has occured:

GMail (16777): Could not find a template set! Looked at (/path/to/my/webmail/gmail/data/templates/simple)

Please enable debugging in setup for more details.

*****************

It is also still looking for the 'simple' template set on the login page giving the same error above if I select no template "--".

Can you not add/remove template sets by duplicating/deleting folders etc? Seems to be causing some errors.

Cheers,
Regan.


Quote Reply
Re: GM 2.0.1 Admin Email Bug In reply to
It's also now giving the error in the admin area when I try to validate a user...

Error: GMail (16931): Could not find a template set! Looked at (/my/path/to/webmail/gmail/data/templates/simple)


Seems like the simple template set is hard coded in somewhere? Is that right?

Regan.


Quote Reply
Re: GM 2.0.1 Admin Email Bug In reply to
Hi,

This was a logic error on the changes to how template sets are chosen. I'll update the copy in the download section. To fix open GMail.pm and add the following lines:
Code:
if (!-e "$CFG->{location}->{path}->{data}/templates/$USER->{users_default_template}") {
$USER->{users_default_template} = $CFG->{tpl_default};
}
In sub template_set just under the line:
Code:
if (ref($USER) eq 'GMail::User') {
It should be around line 590.

Cheers,

Scott

Quote Reply
Re: GM 2.0.1 Admin Email Bug In reply to
Hi,

Testing this I also realized you will need to move the folder corresponding to the template you renamed to the new name. All the image urls are based off the name of the template set. This will be in './images/templates'. './images' being where you chose to put the images.
So if you renamed 'default' to 'simple' you will need to move './images/templates/default' to './images/templates/simple'. For the next release I will make an interface to do this in the admin.

Cheers,

Scott

Quote Reply
Re: GM 2.0.1 Admin Email Bug In reply to
Hi Scott,

Yip, I just figured that one out too :)

It would be cool if you could duplicate a template set through the admin interface as well. Then it could do the template set and the image set at the same time.

Cheers,
Regan.

Quote Reply
Re: GM 2.0.1 Admin Email Bug In reply to
This fix worked scott, but now in the admin area when you do this...

Admin -> Users -> List All -> Click on the link 'email' next to a user..

it brings up their email box, but the paths to all of the images are still trying to point to the 'simple' template set, instead of the correct one which is now 'default'.

Must need another piece of code stuck somewhere else?

Cheers
Regan.


Quote Reply
Re: GM 2.0.1 Admin Email Bug In reply to
Hi,

I can't reproduce this on mine, any possibility you could email me your login/pass so I can have a look?

Cheers,

Scott