Collaboration Emails

Author Message

Russell Michell

Wednesday 24 February 2010 2:21:44 pm

Hi all,

I'm not sure this is a bug but, when receiving approval emails from an Event/Approve workflow, an incorrect value for SiteURL is used in the email template.

I'm using ez4.1.3 using the extension-siteaccess method for multi-sites. I have overridden the default email templates successfully, but the default 'example.com' (from settings/site.ini) is still used as the value of %sitename in extension/my-extension/design/standard/templates/notification/handler/ezcollaboration/view/ezapprove/approve.tpl.

If I modify the template code and replace %sitename with a custom var $site_url as follows, it still does the same thing:

{def 
$site_url=ezini("SiteSettings","SiteURL","site.ini","settings/siteaccess/my-siteaccess/")
}

However, if I add SiteURL to extension/my-extension/settings/site.ini.append.php and change the ezini() accordingly, the email template displays the correct SiteURL:

{def 
$site_url=ezini("SiteSettings","SiteURL","site.ini","extension/my-extension/settings/")
}
{* This also works 
{def 
$site_url=ezini("SiteSettings","SiteURL","site.ini")
}
*}

For my own sanity, I have been trying to keep a my configuration in one place: The main settings/siteaccess/my-siteaccess/blah.ini files.

I don't think the email template should be taking its value from settings/site.ini (using 'example/com') when overrides do exist in settings/siteaccess/my-siteaccess/site.ini.append.php and wonder why it only finally worked when I added SiteURL to extension/my-extension/settings/site.ini.append.php.

Can anyone replicate this?

Cheers all
Russ

Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom

Believe nothing, consider everything.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 21:15:24
Script start
Timing: Jan 30 2025 21:15:24
Module start 'layout'
Timing: Jan 30 2025 21:15:24
Module start 'content'
Timing: Jan 30 2025 21:15:24
Module end 'content'
Timing: Jan 30 2025 21:15:24
Script end

Main resources:

Total runtime0.0218 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0037 588.1328151.2109
Module start 'layout' 0.00370.0031 739.3438220.6875
Module start 'content' 0.00680.0130 960.0313998.0234
Module end 'content' 0.01980.0020 1,958.054729.9922
Script end 0.0217  1,988.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002511.3846140.0002
Check MTime0.00104.7128140.0001
Mysql Total
Database connection0.00052.267710.0005
Mysqli_queries0.00188.088130.0006
Looping result0.00000.044910.0000
Template Total0.00146.310.0014
Template load0.00114.834210.0011
Template processing0.00031.418410.0003
Override
Cache load0.00073.341410.0007
General
dbfile0.00198.598180.0002
String conversion0.00000.027440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs