View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
05936Bug reportsSurvey takingpublic2012-03-23 13:04
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.92+ 
Fixed in Version1.92+ 
Summary05936: INSERTANS cannot be used in "Send basic admin notification email to:"
Description

With 1.91, a lot of user use INSERTANS in basic email notfication to the respondant.

Actually it isn't possible.

I test with {QMAIL};{INSERTANS};QMAIL.

In replacement.php we have:
function dTexts__run($text,$questionNum=NULL)
{
// return LimeExpressionManager::ProcessString($text,$questionNum,NULL,true);
return $text;
}

Steps To Reproduce

Try to put some INSERTANS in basic admin notification

Additional Information

Tested with :
function dTexts__run($text,$questionNum=NULL)
{
return LimeExpressionManager::ProcessString($text,$questionNum,NULL,true);
}

With an anonymous survey, without printing answer, and it's OK for 120321

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)120321
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-03-21 14:49

administrator   ~18021

Fix looks fine. Please commit to 1.92 and 2.0

DenisChenu

DenisChenu

2012-03-21 16:20

developer   ~18024

See to use ReplaceFields and LimeExpressionManager::ProcessString directly.

Maybe some "anonymous issue" else.

TMSWhite

TMSWhite

2012-03-21 17:38

reporter   ~18026

Instead of just doing this:

function dTexts__run($text,$questionNum=NULL)
{
return LimeExpressionManager::ProcessString($text,$questionNum,NULL,true);
}

it's worth seeing where dTexts_run() is called - otherwise you can get significant slow-down since EM will be called many more times than is needed.

I think core problem is that emails aren't being processed through templatereplace(), which internally calls EM.

DenisChenu

DenisChenu

2012-03-21 19:46

developer   ~18027

Last edited: 2012-03-21 19:47

Yep,

It's what i see, think use ReplaceFields is the best solution.

Did anonimity ( TOKEN not replaced ) are set in ReplaceFields or in LimeExpressionManager. Or in ReplaceFields parameter only.

I can look at the code, but think you can answer directly (if my sentence are compréhensible ...

PS: I already have a look at dTexts_run to remove it, there are a lot in index.php and some other.

DenisChenu

DenisChenu

2012-03-22 01:47

developer   ~18037

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8003

Related Changesets

LimeSurvey: master d654c487

2012-03-21 17:46:28

DenisChenu

Details Diff
Fixed issue 05936 : INSERTANS or TOKEN cannot be used in mail adress notification
Dev : replace old dTexts::Run by ReplaceFields
Dev : Remove anonymized dtexts : already done with ReplaceFields ExpressionManager functionnality
Affected Issues
05936
mod - index.php Diff File
mod - replacements.php Diff File

Issue History

Date Modified Username Field Change
2012-03-21 13:27 DenisChenu New Issue
2012-03-21 14:49 c_schmitz Assigned To => DenisChenu
2012-03-21 14:49 c_schmitz Status new => assigned
2012-03-21 14:49 c_schmitz Note Added: 18021
2012-03-21 16:20 DenisChenu Note Added: 18024
2012-03-21 17:38 TMSWhite Note Added: 18026
2012-03-21 19:46 DenisChenu Note Added: 18027
2012-03-21 19:47 DenisChenu Note Edited: 18027
2012-03-22 01:47 DenisChenu Changeset attached => LimeSurvey master d654c487
2012-03-22 01:47 DenisChenu Note Added: 18037
2012-03-22 01:47 DenisChenu Resolution open => fixed
2012-03-22 01:59 DenisChenu Status assigned => resolved
2012-03-23 13:04 c_schmitz Status resolved => closed
2012-03-23 13:04 c_schmitz Fixed in Version => 1.92+