[Koha-bugs] [Bug 34704] Print templates are formatted incorrectly

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 27 00:06:55 CEST 2023


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

--- Comment #22 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
(In reply to Lucas Gass from comment #20)
> I have a question. When we tick the box to make a notice an HTML message (
> is_html=1 ) do we expect in the entire template to marked up? In Matt's
> example that is the case.

Hm, I think we are getting to the bottom of this now.

Yes, I think we do for email notices and we should also do that for print
notices? 

If we use HTML and especially with TT mark-up we want the line breaks to be
explicit, not implicit. You will want to format a CASE statement or similar on
multiple lines to be readable. And it should collapse them as expected from
HTML.

Doing implicit line breaks might help people who didn't stick with HTML, but it
removes control for everyone else and force us to do weird things. 

Our templates are getting more advanced and complicated all the time with TT, I
could also see an IF-statement, that leaves blank lines if the condition is not
met. I believe that this behaviour will bite us.

> I ask because we have a lot of templates where this is not the case. For
> instance someone might add a logo at the top of the notice, <img
> src="somesorc" width="500" alt="somealt" />
> 
> 
> But after that they rest of the notice is NOT marked up. So here is my
> example template:
> 
> ****
> <div id="test">TEST1</div>
> 
> 
> Our Address
> Our City
> Our State
> 
> 
> Thank you,
> 
> 
> Library
> ****
> 
> 
> With no patch applied I continue to have line breaks honored for the content
> NOT wrapped in HTML elements.
> 
> With the patch my non-marked up content looks like this:
> 
> ****
> Our Address Our City Our State
> Thank you,
> Library
> ****
> 
> 
> With no regex, like Cait suggests I get this for my non-marked up content:
> 
> ****
> Our Address Our City Our State Thank you, Library
> ****

I can see where this whole thing is a problem now when this has worked before
:(

For consistency: How do these templates behave when looked at in the notices
tab or when sent per email?

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


More information about the Koha-bugs mailing list