Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Custom_subject Rendering After Update to 6.2.74 #1924

Open
KAZUMA87 opened this issue Jan 14, 2025 · 1 comment
Open

Issue with Custom_subject Rendering After Update to 6.2.74 #1924

KAZUMA87 opened this issue Jan 14, 2025 · 1 comment
Labels

Comments

@KAZUMA87
Copy link

I have been using Sympa's Custom_subject feature with the following configuration:

[% list.name %]:[% list.sequence %]
Previously, emails were sent with subjects like [Sample:1]. However, after updating to version 6.2.74, without making any changes to the configuration, the email subjects have changed to:

[Sample:1][% list.sequence %]
Now, [% list.sequence %] is being displayed literally in the subject line.

I believe this issue is caused by the changes introduced in #1811.

While the sequence number is being correctly incremented and displayed, the [% list.sequence %] placeholder is redundantly appended. I would like the extra [% list.sequence %] to be removed so that the subject returns to the intended format, such as [Sample:1].

Steps to Reproduce:

Configure Custom_subject in Sympa as [% list.name %]:[% list.sequence %].
Send a test email to observe the subject line.
Update Sympa to version 6.2.74.
Send another test email to observe the changed subject line.

Expected Behavior:
The email subject should appear as [Sample:1] without the [% list.sequence %] placeholder.

Actual Behavior: The email subject appears as [Sample:1][% list.sequence %], displaying the placeholder literally.

Additional Information:

Sympa Version: 6.2.74
Suspected Change: #1811

@KAZUMA87 KAZUMA87 added the bug label Jan 14, 2025
@ikedas
Copy link
Member

ikedas commented Jan 16, 2025

Hi @KAZUMA87 , thank you for reporting bug!

As a quick fix, could you try this patch?

diff --git a/src/lib/Sympa/Spindle/TransformIncoming.pm b/src/lib/Sympa/Spindle/TransformIncoming.pm
index f88253378..d2ee996bd 100644
--- a/src/lib/Sympa/Spindle/TransformIncoming.pm
+++ b/src/lib/Sympa/Spindle/TransformIncoming.pm
@@ -166,6 +166,7 @@ sub _twist {
             my $subject_field;
             my $re_regexp = Sympa::Regexps::re();
 
+            '' =~ /()/;    # clear $1
             if ($message->{'subject_charset'}) {
                 # Note that Unicode case-ignore match is performed.
                 my $uStem =

@ikedas ikedas pinned this issue Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants