[Koha-bugs] [Bug 35163] New: overdue_notices.pl wrongly reports "terms were not matched and replaced"

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 26 15:18:36 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35163

            Bug ID: 35163
           Summary: overdue_notices.pl wrongly reports "terms were not
                    matched and replaced"
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Command-line Utilities
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: magnus at libriotech.no
        QA Contact: testopia at bugs.koha-community.org
                CC: robin at catalyst.net.nz

I tried running overdue_notices.pl with the --verbose argument, and got a bunch
of messages like this: 

The following terms were not matched and replaced: 
        div class="adress_odue"
        div class="adressrad"
        /div
...

But the generated messages in the message_queue looks ok. The message comes
from this code, around line 766 of misc/cronjobs/overdue_notices.pl:

my @misses = grep { /./ } map { /^([^>]*)[>]+/; ( $1 || '' ); } split /\</,
$letter->{'content'};
if (@misses) {
    $verbose and warn "The following terms were not matched and replaced: \n\t"
. join "\n\t", @misses;
}

I have a hunch this is meant to look for things like <<something>> that are
still left in the $letter->{'content'}, but it actually finds and reports on
things like <something>, including HTML tags. So maybe it can be improved to
look for <<>>? 

Maybe there should even be two different checks like this, one for HTML
messages and one for non-HTML-messages?

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list