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

--- Comment #29 from Jan Kissig <[email protected]> ---
Created attachment 200914
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200914&action=edit
Bug 42292: (follow-up) Fix duplicate NovelistSelectProfile declaration

In the new tt-allowed block, the NovelistSelect fallback declarations
redeclare `NovelistSelectProfile` instead of also exposing
`NovelistSelectPassword`:

    var NovelistSelectProfile = "[% NovelistSelectProfile | html %]";
    var NovelistSelectProfile = "[% NovelistSelectPassword | html %]";

So `NovelistSelectProfile` ends up holding the password, and
`NovelistSelectPassword` is never declared. The later
`novSelect.loadContentForQuery(..., NovelistSelectProfile,
NovelistSelectPassword, ...)` call then throws ReferenceError and
NovelistSelect content never loads on biblio detail pages.

Rename the second declaration to `NovelistSelectPassword` to match
the original template behaviour.

To test:
- Configure the NovelistSelect sysprefs (NovelistSelectEnabled,
  NovelistSelectProfile, NovelistSelectPassword) in the OPAC. Real
  NovelistSelect content only loads with valid EBSCO subscription
  credentials -- with dummy values the JS path still runs but the
  tab stays empty; that is still sufficient to verify this fix.
- Open an OPAC biblio detail page with a known ISBN.
- In the browser console, run
  console.log(NovelistSelectProfile, NovelistSelectPassword)
  and confirm both values are printed (before the fix,
  NovelistSelectPassword is undefined).
- With valid subscription credentials, NovelistSelect content loads
  in its tab/panel instead of throwing a ReferenceError in the
  console.

Signed-off-by: Paul Derscheid <[email protected]>
Signed-off-by: Jan Kissig <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
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 via email to