View Issue Details

This issue affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
18360Bug reportsPluginspublic2026-11-19 22:22
ReporterDenisChenu Assigned To 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Summary18360: beforeEmail event : Unable to replace core replacement in plugin
Description

When use emailevent, it can be interesting to use or add own replacement, to use : we can add element in mailer->aReplacements and call a second time $mailer->doReplacements
But we can not update core replacement there are an easy solution for this.

Steps To Reproduce

I work on https://gitlab.com/SondagesPro/TokenManagement/TokenUsersListAndManage/-/blob/master/Utilities.php#L218Update cirrently …
No real step … since plugin are not ready for 5.X

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version
Git branch / Pull Request URLhttps://github.com/LimeSurvey/LimeSurvey/pull/2611

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2022-09-16 19:06

developer   ~71806

I think it can be very interesting,
We can redo whole replacement on plugin , but here : more easy and if core add replacement : we have it.

DenisChenu

DenisChenu

2022-09-22 08:11

developer   ~71882

@ollehar : since there are no real way to test : can merge it like that ?

I found it when working on https://gitlab.com/SondagesPro/TokenManagement/TokenUsersListAndManage/-/blob/master/Utilities.php#L240

But here : i replace before the update.

ollehar

ollehar

2022-09-22 10:05

reporter   ~71886

Ehm, what kind of change are you suggesting?

DenisChenu

DenisChenu

2022-09-22 10:27

developer   ~71889

Oh … lost the link
https://github.com/LimeSurvey/LimeSurvey/pull/2611

Then plugin can replace core replacement
Update the array_merge

c_schmitz

c_schmitz

2026-11-19 22:22

administrator   ~87671

The change from PR #2611 is in LimeSurvey 7: in LimeMailer::doReplacements() the replacements a plugin sets in beforeEmail now override the core and token replacements. Closing as fixed.

Issue History

Date Modified Username Field Change
2022-09-16 18:59 DenisChenu New Issue
2022-09-16 19:00 DenisChenu Summary Unable to replace core replacement in plugin => beforeEmail event : Unable to replace core replacement in plugin
2022-09-16 19:05 DenisChenu Assigned To => DenisChenu
2022-09-16 19:05 DenisChenu Status new => assigned
2022-09-16 19:05 DenisChenu Assigned To DenisChenu => gabrieljenik
2022-09-16 19:06 DenisChenu Status assigned => ready for code review
2022-09-16 19:06 DenisChenu Note Added: 71806
2022-09-16 19:06 DenisChenu Bug heat 0 => 2
2022-09-21 22:03 gabrieljenik Assigned To gabrieljenik => DenisChenu
2022-09-21 22:03 gabrieljenik Status ready for code review => ready for testing
2022-09-22 08:11 DenisChenu Note Added: 71882
2022-09-22 10:05 ollehar Note Added: 71886
2022-09-22 10:05 ollehar Bug heat 2 => 4
2022-09-22 10:27 DenisChenu Note Added: 71889
2022-09-28 10:51 DenisChenu Git branch / Pull Request URL N/A => https://github.com/LimeSurvey/LimeSurvey/pull/2611
2022-09-28 10:51 DenisChenu Assigned To DenisChenu =>
2022-09-28 10:52 DenisChenu Priority none => normal
2026-11-19 22:22 c_schmitz Note Added: 87671
2026-11-19 22:22 c_schmitz Bug heat 4 => 6
2026-11-19 22:22 c_schmitz Status ready for testing => closed
2026-11-19 22:22 c_schmitz Resolution open => fixed