Thanks a lot for the simplenews module to every maintainer, first.
I've encountered a strange behaviour of the template overrides with the simplenews.
When sending a newsletter by user 1 (administrator) the theme override only worked for me when the template files for body and footer were placed in the administrator theme (i.e. seven).
But when another authorized user (user > 1) sent the same newsletter the theme override only worked when the template files were placed in the default theme.
Besides Drupal 7.12 and many other contrib modules I am using mimemail-7.x-1.0-alpha1 (including the mime mail compressor sub module) and mailsystem-7.x-2.31. Mimemail is set to use the default (non-admin) theme for rendering the email newsletter and mailsystem is set to use the mimemail classes. The file mail.css in my tests were always taken from the default theme.
I didn't find a right so that the user > 1 would have the same behaviour than user 1 or vice versa resulting into having the same two files now in the admin and the default theme.
What did I probably wrong or might there be a bug in one of the modules?
Thanks for any advice.
Comments
Comment #1
meichr commentedClarifying the title.
Comment #2
berdirI assume the non uid 1 user is not allowed to use the admin theme right?
To what exactly is the mailsystem theme setting set? "Default theme" (or something like this) or explicitly the public default theme? You need to set it to the second (your public default theme explicitly), default theme means whatever is currently active for this page.
Comment #3
berdirAlso, you either need to use the latest mimemail dev snapshot so that it uses the mailsystem theme setting or configure it separately.
Comment #4
meichr commentedYep, you nailed it. I had "Default" theme set in Mail System and Mime Mail configuration. And the right to use the admin theme is not granted to any authorized non uid 1 user.
After changing the theme explicitly to the public theme of the website, the templates are now consequently taken from the public theme's directory.
My main misunderstanding was, that "Default" would mean the default public theme and not one of the default themes: public or admin.
Upgrading to the latest dev of Mimemail 7.x as suggested removed the theme select box from the Mimemail configuration as the theme used by Mimemail is now taken from Mailsystem configuration => easier configuration.
I also upgraded to today's Mailsystem 7.x-2.33, solution continues to work.
Berdir, thanks a lot for supporting.
Comment #5
berdirThis new feature was added very recently, we're still getting support requests about it now and then.
What would really help, is a documentation page/blog entry somewhere that I can link to that explains this in detail (which modules/versions you need, what to configure where, ...).
Would be great if you could start something and link it here, it doesn't need to be perfect to start. Then I wouldn't have to explain it over and over again :)
Comment #7
albie001 commentedExcuse my ignorance but what exactly do you mean by the public theme?
I initially had my custom tpl.php files in 'sites/all/themes/seven/' as this fixed the problem of the header and footer template files not being read.
However as discussed above, when the client logs in and does not have access to the administration theme, the simplenews header and footer templates are not picked up.
In laymans terms could you tell me where I should be putting the tp.php files? I have tried adding them to various theme folders and they continue to work for user-1 but not for anyone else?
This is truly driving me bonkers as I do not want to give users access to the admin theme.
Any help would be greatly appreciated.