Bug 10605 - Problems with translated cart email sent
Summary: Problems with translated cart email sent
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.14
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 11443
  Show dependency treegraph
 
Reported: 2013-07-17 14:39 UTC by Katrin Fischer
Modified: 2015-06-04 23:23 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed patch (1.67 KB, patch)
2013-09-24 16:49 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 10605: Encoding issue on sending a basket (OPAC) (2.30 KB, patch)
2013-11-14 11:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 10605: Encoding issue on sending a basket (INTRANET) (833 bytes, patch)
2013-11-14 11:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 10605: Encoding issue on sending a basket (INTRANET) (982 bytes, patch)
2013-11-18 14:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 10605: Encoding issue on sending a basket (OPAC) (2.00 KB, patch)
2013-11-18 14:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 10605: Encoding issue on sending a basket (INTRANET) (816 bytes, patch)
2013-11-18 14:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED OFF] Bug 10605: Encoding issue on sending a basket (OPAC) (2.07 KB, patch)
2013-11-19 07:41 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED OFF] Bug 10605: Encoding issue on sending a basket (INTRANET) (1.00 KB, patch)
2013-11-19 07:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED-QA] Bug 10605: Encoding issue on sending a basket (OPAC) (2.12 KB, patch)
2013-11-19 22:07 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 10605: Encoding issue on sending a basket (OPAC) (2.12 KB, patch)
2013-11-19 22:08 UTC, Brendan Gallagher
Details | Diff | Splinter Review
[PASSED-QA] Bug 10605: Encoding issue on sending a basket (INTRANET) (1.06 KB, patch)
2013-11-19 22:10 UTC, Brendan Gallagher
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2013-07-17 14:39:57 UTC
I spotted some problems with sending cart emails from the OPAC:

There is a problem with encoding, as the umlauts in the translated German message are broken.

The first paragraph is repeated and the list of items is completely missing.

I have seen this happening on 3.12.1 - would be glad if someone could test and confirm on their installation.
Comment 1 Claudio Costales 2013-09-15 02:36:55 UTC
Encoding problem also in 3.12.4
Comment 2 Frédéric Demians 2013-09-24 16:49:33 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2013-11-13 14:45:50 UTC
Still seeing this in 3.12.6 - missed checking this bug again :(
Comment 4 Katrin Fischer 2013-11-13 23:00:39 UTC
I haven't figured out why yet, but with the patch applied, my links from the cart email to the records in the OPAC are missing the biblionumber. On master it seems ok.
Comment 5 Katrin Fischer 2013-11-13 23:08:02 UTC
Frederic, could you take a look at the links? I am a bit puzzled why your patch would make a difference there.

Example:
  In online catalog:
       http://localhost/cgi-bin/koha/opac-detail.pl?biblionumber=
Comment 6 Katrin Fischer 2013-11-14 07:02:48 UTC
I think it might be the combination of = and a number that is doing it. I remember seeing problems with that somewhere else, but I can't find it now.
Comment 8 Frédéric Demians 2013-11-14 08:12:10 UTC
Katrin: which email client are you using? For me, it works with Thunderbird and Gmail.
Comment 9 Katrin Fischer 2013-11-14 08:26:10 UTC
I am using Thunderbird
Comment 10 Katrin Fischer 2013-11-14 08:28:18 UTC
It could be something in the settings of course, but I think I am using pretty much the standard there. I noticed that I had to manually switch to utf-8 to make the umlauts show correctly as the automatic detection didn't seem to work - might be my settings or some deeper issue?
Comment 11 Frédéric Demians 2013-11-14 08:59:34 UTC
> It could be something in the settings of course, but I think I am using
> pretty much the standard there. I noticed that I had to manually switch to
> utf-8 to make the umlauts show correctly as the automatic detection didn't
> seem to work - might be my settings or some deeper issue?

You server mailer could be the culprit. Which SMTP server are you using? I conduct my tests on a Koha server that runs Exim4.
Comment 12 Katrin Fischer 2013-11-14 09:09:48 UTC
I have to admit that I am not sure and can't check right now - someone else set up mailing for me on my laptop and I was happy to never have to touch it since.
Maybe we can get some others testing this and compare results?
Comment 13 Jonathan Druart 2013-11-14 09:54:10 UTC
My tests:

Without the patch (on the master branch):
Hum... the received mail is really weird:

    Bonjour,

   JOUBU vous a envoyé un panier de références extraites de notre
   catalogue.

   Notez que le fichier attaché est un fichier MARC, qui peut être
   importé dans un logiciel de gestion de bibliographie tel que EndNote,
   Reference Manager ou ProCite.

   ---------------------------------------------------------------------


   Bonjour,

   JOUBU vous a envoyé un panier de références extraites de notre
   catalogue.

   Notez que le fichier attaché est un fichier MARC, qui peut être
   importé dans un logiciel de gestion de bibliographie tel que EndNote,
   Reference Manager ou ProCite.

   ---------------------------------------------------------------------

With the patch:

   Bonjour,

   JOUBU vous a envoyé un panier de références extraites de notre
   catalogue.

   Notez que le fichier attaché est un fichier MARC, qui peut être
   importé dans un logiciel de gestion de bibliographie tel que EndNote,
   Reference Manager ou ProCite.

   ---------------------------------------------------------------------

   un message personnalisé pour toi

   ---------------------------------------------------------------------

     1.  I love english junior

       Auteur(s) : Bruno FRAPPAT ; Frappat --Bruno -- Directeur de la pub
       Publié par : Bayard-presse , 57

       Dans le catalogue :
       http://opac.koha_coderun.localhost/cgi-bin/koha/opac-detail.pl?biblionumber9

       Exemplaires :

         *  Le Cannet Documentaires adulte 00519000164128



All looks good, except the link url.
Comment 14 Jonathan Druart 2013-11-14 11:22:41 UTC Comment hidden (obsolete)
Comment 15 Jonathan Druart 2013-11-14 11:22:47 UTC Comment hidden (obsolete)
Comment 16 Jonathan Druart 2013-11-14 11:23:52 UTC
With the last patch, I get:

   Bonjour,

   JOUBU vous a envoyé un panier de références extraites de notre
   catalogue.

   Notez que le fichier attaché est un fichier MARC, qui peut être
   importé dans un logiciel de gestion de bibliographie tel que EndNote,
   Reference Manager ou ProCite.

   ---------------------------------------------------------------------

   opac testé
   ---------------------------------------------------------------------

     1.  Pays de Provence Côte d'Azur

       Auteur(s) : Richard Clavaud ; Clavaud --Richard -- Directeur de la
       pub
       Publié par : Milan presse , 57

       Dans le catalogue :
       http://opac.koha_coderun.localhost/cgi-bin/koha/opac-detail.pl?biblionumber=13
Comment 17 Jonathan Druart 2013-11-14 11:24:30 UTC
This is a major bug, it should be in 3.14. Please test!
Comment 18 Katrin Fischer 2013-11-17 17:13:03 UTC
I am sorry, but this is still giving me trouble.

For the intranet:
Software error:

Undefined subroutine &main::decode called at /home/katrin/kohaclone/basket/sendbasket.pl line 136.

For help, please send mail to the webmaster (webmaster@bumblebee), giving this error message and the time and date of the error. 


And in OPAC:
In the received email, the introduction text has broken umlauts, but the title information is ok (tested in Thunderbird). When I switch the encoding to utf-8, the introduction text is ok, but the umlauts in the title information are broken. It looks to me, like we have a mix now.
Comment 19 Jonathan Druart 2013-11-18 14:21:55 UTC Comment hidden (obsolete)
Comment 20 Jonathan Druart 2013-11-18 14:23:21 UTC
(In reply to Katrin Fischer from comment #18)
> I am sorry, but this is still giving me trouble.
> 
> For the intranet:
> Software error:

Last patch fixes this error.
Comment 21 Jonathan Druart 2013-11-18 14:45:53 UTC Comment hidden (obsolete)
Comment 22 Jonathan Druart 2013-11-18 14:45:59 UTC Comment hidden (obsolete)
Comment 23 Jonathan Druart 2013-11-18 14:47:31 UTC
(In reply to Katrin Fischer from comment #18)
> And in OPAC:
> In the received email, the introduction text has broken umlauts, but the
> title information is ok (tested in Thunderbird). When I switch the encoding
> to utf-8, the introduction text is ok, but the umlauts in the title
> information are broken. It looks to me, like we have a mix now.

Reproduced using icedove (~ Thunderbird).

I don't occurs encoding issue with the 2 last patches. Could you retest please?
Comment 24 Katrin Fischer 2013-11-19 07:41:45 UTC Comment hidden (obsolete)
Comment 25 Katrin Fischer 2013-11-19 07:42:05 UTC Comment hidden (obsolete)
Comment 26 Katrin Fischer 2013-11-19 07:43:11 UTC
NOTE: The staff cart email is missing the links back to the OPAC - but that is on master and with the patches, so another bug.
Comment 27 Brendan Gallagher 2013-11-19 22:07:16 UTC
Created attachment 23044 [details] [review]
[PASSED-QA] Bug 10605: Encoding issue on sending a basket (OPAC)

There is an encoding issue on the received mail.
Here, we have to keep the encode_qp in order not to break links (= is a
special char for email https://en.wikipedia.org/wiki/MIME#Encoded-Word).

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 28 Brendan Gallagher 2013-11-19 22:08:46 UTC Comment hidden (obsolete)
Comment 29 Brendan Gallagher 2013-11-19 22:10:20 UTC
Created attachment 23046 [details] [review]
[PASSED-QA] Bug 10605: Encoding issue on sending a basket (INTRANET)

Same fix for the staff interface.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Both patches tested with English and German, diacritics
now appear correctly if UTF-8 is selected as encoding.
Passes all tests and QA script.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Comment 30 Galen Charlton 2013-12-10 04:41:57 UTC
Pushed to master.  Thanks, Jonathan!
Comment 31 Fridolin Somers 2013-12-24 10:48:36 UTC
Patches pushed to 3.14.x, will be in 3.14.2.
Comment 32 Fridolin Somers 2013-12-24 10:55:21 UTC
NB : looking at opac-sendbasket.pl and sendbasket.pl, I noticed that nearly all code is identical. This should be moved in a module.
Comment 33 Frédéric Demians 2013-12-24 11:03:24 UTC
(In reply to Fridolin SOMERS from comment #32)
> NB : looking at opac-sendbasket.pl and sendbasket.pl, I noticed that nearly
> all code is identical. This should be moved in a module.

Indeed: see bug 11443. Thks.
Comment 34 Tomás Cohen Arazi 2014-01-15 14:56:19 UTC
This patch has been pushed to 3.12.x, will be in 3.12.9.

Thanks Jonathan!