[Bug 25293] New: Don't call escapeHtml on null

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 25293] New: Don't call escapeHtml on null

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293

            Bug ID: 25293
           Summary: Don't call escapeHtml on null
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P5 - low
         Component: Circulation
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email], [hidden email]

EscapeHtml is still called on many fields without testing if they exist:
Uncaught TypeError: Cannot read property 'escapeHtml' of null

Fields like title, branchcode and so on aren't guarantee to be not null.

If they are, for whatever reason, broken items are often next to unfixable
within Koha.

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 25293] Don't call escapeHtml on null

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293

didier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]-commun |[hidden email]
                   |ity.org                     |om

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 25293] Don't call escapeHtml on null

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293

--- Comment #1 from didier <[hidden email]> ---
Created attachment 103862
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103862&action=edit
Bug 25293: Don't call escapeHtml on null

 Test Plan:

    1) Create two Checkouts
    2) view patron's checkout list
cgi-bin/koha/members/moremember.pl?borrowernumber=pp <show checkout>
    3) in mysql shell delete a checkout home branch: update items set
homebranch = null where itemnumber = xx;
    4) view patron's checkout list, again

    Without this patch the list is empty.

    Same if biblio title is null (update biblio set title = null where
biblionumber = yy;).
    Javascript error:
    TypeError: oObj.title is null

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 25293] Don't call escapeHtml on null

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293

didier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 25293] Don't call escapeHtml on null

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293

Frédéric Demians <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #2 from Frédéric Demians <[hidden email]> ---
How an item can have a 'homebranch' field empty or how can a biblio record have
no title?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 25293] Don't call escapeHtml on null

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293

--- Comment #3 from didier <[hidden email]> ---
(In reply to Frédéric Demians from comment #2)
> How an item can have a 'homebranch' field empty or how can a biblio record
> have no title?

Hi,

No idea, likely a bug somewhere, but they do.
It seems that some imported MARC data can produce biblio records without title
though.

Anyway, both
update items set homebranch = null where itemnumber = ...;
and
update biblio set title = null where biblionumber = ...;
don't return an error, thus from the DB DDL POV they are valid, if they are not
then something at the application level has to deal with it.

checkouts.js is likely not the right place, only one with the fewer unexpected
side effects.

Regards
Didier

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 25293] Don't call escapeHtml on null

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293

George Veranis <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #4 from George Veranis <[hidden email]> ---
(In reply to Frédéric Demians from comment #2)
> How an item can have a 'homebranch' field empty or how can a biblio record
> have no title?

A biblio can not have a title if you not entered in biblio framework , some
cataloguers do that for some special records.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 25293] Don't call escapeHtml on null

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293

David Cook <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #5 from David Cook <[hidden email]> ---
I usually encounter this issue because of the Keyword To MARC mapping removal,
which caused some really bad Koha to MARC mappings in the biblio.

It caused a lot of problems for us.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 25293] Don't call escapeHtml on null

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293

--- Comment #6 from Jonathan Druart <[hidden email]> ---
*** Bug 25678 has been marked as a duplicate of this bug. ***

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 25293] Don't call escapeHtml on null

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org

--- Comment #7 from Jonathan Druart <[hidden email]> ---
(In reply to David Cook from comment #5)
> I usually encounter this issue because of the Keyword To MARC mapping
> removal, which caused some really bad Koha to MARC mappings in the biblio.
>
> It caused a lot of problems for us.

So, sign it off?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 25293] Don't call escapeHtml on null

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25293

--- Comment #8 from David Cook <[hidden email]> ---
(In reply to Jonathan Druart from comment #7)
> (In reply to David Cook from comment #5)
> > I usually encounter this issue because of the Keyword To MARC mapping
> > removal, which caused some really bad Koha to MARC mappings in the biblio.
> >
> > It caused a lot of problems for us.
>
> So, sign it off?

That takes time and effort, and it isn't a local priority at the moment. It's
on my TODO list, but it's a long list with other higher priorities.

This issue almost always indicates a misconfiguration or bad data, so it's not
really a critical issue.

Since it's a non-critical issue, I could just sign it off, but I rather put the
time in to test it fully. But that means it's not going to happen today.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/