Bug 13922 - MODS Export Broken on Package
Summary: MODS Export Broken on Package
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-26 21:03 UTC by Nicole C. Engard
Modified: 2018-06-04 20:10 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2015-03-26 21:03:16 UTC
When trying to export using MODS you will get this error:

Software error:

Can't locate object method "code" via package "Could not create file parser context for file "/usr/share/koha/intranet/cgi-bin/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl": No such file or directory at /usr/share/koha/opac/cgi-bin/opac/unapi line 207.
" (perhaps you forgot to load "Could not create file parser context for file "/usr/share/koha/intranet/cgi-bin/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl": No such file or directory at /usr/share/koha/opac/cgi-bin/opac/unapi line 207.
"?) at /usr/share/koha/opac/cgi-bin/opac/unapi line 150.




It looks like a path issue.  It is looking for:

/usr/share/koha/intranet/cgi-bin/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl

But the correct path appears to be:

/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl

The incorrect path does appear to be a mix of package and git paths.
Comment 1 Nicole C. Engard 2015-03-26 21:42:04 UTC
Okay, I did a little more checking. The bug appears to be in /usr/share/koha/opac/cgi-bin/opac/unapi, line 201. It's concatenating the value of 'intranetdir' with "/koha-tmpl/intranet-tmpl/prog/en/xslt/", which is what is leading to the incorrect path.
Comment 2 Tomás Cohen Arazi 2015-03-26 21:49:17 UTC
(In reply to Nicole C. Engard from comment #1)
> Okay, I did a little more checking. The bug appears to be in
> /usr/share/koha/opac/cgi-bin/opac/unapi, line 201. It's concatenating the
> value of 'intranetdir' with "/koha-tmpl/intranet-tmpl/prog/en/xslt/", which
> is what is leading to the incorrect path.

There's a function that specifically chooses the correct path. It should use it.
Comment 3 Jonathan Druart 2015-07-15 11:58:30 UTC
The intranetdir seems to have been removed by 13469 (but pushed before you have reported this bug report).
Could you confirm it's still valid?
Comment 4 Katrin Fischer 2017-06-09 15:21:53 UTC
I just tested MODS (XML) export from the detail page and it works fine.