---- Reported by dearden@sarsf.org 2008-11-11 08:54:32 ---- I turned on both OPAC xslt options and edited the MARC21slim2OPACDetail.xsl file in the default prog theme to change the way the link under the title works. I am running multiple databases and only wanted this to apply to a single one. I copied the prog directory as a new name, and set the xsl file in the prog theme to the original one and the xsl file in my new theme to my new one. I then changed the opacthemes option to point to the new theme. I connected to the OPAC and there was no difference from the original. I then changed a color in the css file in the new theme location to confirm it was looking in the correct place, the color changed on the OPAC. I renamed prog to progx, and tried again. I get this error. Koha error The following fatal error has occurred: Could not create file parser context for file "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl": No such file or directory at /usr/share/koha/lib/C4/XSLT.pm line 121 Apache Server version: Apache/2.2.3 Server built: Mar 22 2008 09:29:10 Koha 3.00.00.107 Koha DB 3.0000107 MySQL mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2 OS Linux SAR56Linux 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 UTC 2008 i686 GNU/Linux Perl 5.008008 Looks like the pointer to the xslt directory is still pointing to the one in the prog theme instead of my new theme. ---- Additional Comments From oleonard@myacpl.org 2008-11-11 09:16:45 ---- There are a LOT of instances in templates and code where the "prog" theme is hardcoded. --- Bug imported by chris@bigballofwax.co.nz 2010-05-21 00:55 UTC --- This bug was previously known as _bug_ 2774 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2774 Unknown operating system Linux - Debian. Setting to default OS "All". Actual time not defined. Setting to 0.0
Have we fixed many of these?
(In reply to comment #1) > Have we fixed many of these? Try running this command in the base Koha directory: grep -r --exclude=*.po "/prog/" * Looks like there are quite a few instances left...
I'm making this bug dependent on Bug 4048 because it doesn't make sense to modify hard-coded paths if the path is going to change.
Created attachment 16863 [details] [review] Bug 2774 - Path to theme is hard-coded in many places Many templates have instances where the path to the prog template is hard-coded. Now that interface and theme template variables are available everywhere these paths should be corrected to use them. Image paths corrected: - 'Patron image missing' image on circulation pages - 'Locked' icon on fund planning page - Tag and subfield edit icons on the authority, biblio editor, and batch item modification pages (Clone tag, delete tag, clone subfield, delete subfield, move subfield) - 'Loading' icon when importing frameworks Audio file paths corrected: - Sounds for circulation.pl and returns.pl Paths to DataTables assets corrected on: - Transfers to receive report - Holds queue report - Holds awaiting pickup report - Patron detail page (moremember.pl) - Patron circulation history - Update child to adult patron page - Process offline circulations - Catalog by item type report - Serials statistics wizard - Serial claims page - Koha news - Notices - Batch patron modifications Path to progress bar assets corrected on: - Process offline circulations page - Progressbar include file - Stage MARC imports - Manage MARC imports - Local cover image upload Other image paths: - "Approved" checkmark image on tags review page - Table sort icons on lists page - Feed icon on OPAC search result page - "Loading" image for OPAC plain MARC view Path to ratings JavaScript on OPAC detail and results pages
(In reply to comment #4) > Created attachment 16863 [details] [review] [review] > Bug 2774 - Path to theme is hard-coded in many places > > Many templates have instances where the path to the prog template is > hard-coded. Now that interface and theme template variables are > available everywhere these paths should be corrected to use them. > > Image paths corrected: > > - 'Patron image missing' image on circulation pages > - 'Locked' icon on fund planning page > - Tag and subfield edit icons on the authority, biblio editor, and batch > item modification pages (Clone tag, delete tag, clone subfield, > delete subfield, move subfield) > - 'Loading' icon when importing frameworks > > Audio file paths corrected: > > - Sounds for circulation.pl and returns.pl > > Paths to DataTables assets corrected on: > > - Transfers to receive report > - Holds queue report > - Holds awaiting pickup report > - Patron detail page (moremember.pl) > - Patron circulation history > - Update child to adult patron page > - Process offline circulations > - Catalog by item type report > - Serials statistics wizard > - Serial claims page > - Koha news > - Notices > - Batch patron modifications > > Path to progress bar assets corrected on: > > - Process offline circulations page > - Progressbar include file > - Stage MARC imports > - Manage MARC imports > - Local cover image upload > > Other image paths: > > - "Approved" checkmark image on tags review page > - Table sort icons on lists page > - Feed icon on OPAC search result page > - "Loading" image for OPAC plain MARC view > > Path to ratings JavaScript on OPAC detail and results pages Awesome work, Owen. Any thoughts on how to test this one? Is there a way to automate the testing to make sure that each path actually gets formed correctly?
Created attachment 17388 [details] [review] Bug 2774 - Path to theme is hard-coded in many places Many templates have instances where the path to the prog template is hard-coded. Now that interface and theme template variables are available everywhere these paths should be corrected to use them. Image paths corrected: - 'Patron image missing' image on circulation pages - 'Locked' icon on fund planning page - Tag and subfield edit icons on the authority, biblio editor, and batch item modification pages (Clone tag, delete tag, clone subfield, delete subfield, move subfield) - 'Loading' icon when importing frameworks Audio file paths corrected: - Sounds for circulation.pl and returns.pl Paths to DataTables assets corrected on: - Transfers to receive report - Holds queue report - Holds awaiting pickup report - Patron detail page (moremember.pl) - Patron circulation history - Update child to adult patron page - Process offline circulations - Catalog by item type report - Serials statistics wizard - Serial claims page - Koha news - Notices - Batch patron modifications Path to progress bar assets corrected on: - Process offline circulations page - Progressbar include file - Stage MARC imports - Manage MARC imports - Local cover image upload Other image paths: - "Approved" checkmark image on tags review page - Table sort icons on lists page - Feed icon on OPAC search result page - "Loading" image for OPAC plain MARC view Path to ratings JavaScript on OPAC detail and results pages Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Checked all the pages modified by this patch, no problems noted
QA comment: No issue found. There are still some occurrences: - reserve/request.tt - labels/label-manage.tt - reports/guided_reports_start.tt - authorities/detail.tt - opac-auth-MARCdetail.tt - opac-auth-detail.tt - opac-reserve.tt Not blocker, but is there a reason? Marked as Passed QA.
Created attachment 17611 [details] [review] Bug 2774 - Path to theme is hard-coded in many places Many templates have instances where the path to the prog template is hard-coded. Now that interface and theme template variables are available everywhere these paths should be corrected to use them. Image paths corrected: - 'Patron image missing' image on circulation pages - 'Locked' icon on fund planning page - Tag and subfield edit icons on the authority, biblio editor, and batch item modification pages (Clone tag, delete tag, clone subfield, delete subfield, move subfield) - 'Loading' icon when importing frameworks Audio file paths corrected: - Sounds for circulation.pl and returns.pl Paths to DataTables assets corrected on: - Transfers to receive report - Holds queue report - Holds awaiting pickup report - Patron detail page (moremember.pl) - Patron circulation history - Update child to adult patron page - Process offline circulations - Catalog by item type report - Serials statistics wizard - Serial claims page - Koha news - Notices - Batch patron modifications Path to progress bar assets corrected on: - Process offline circulations page - Progressbar include file - Stage MARC imports - Manage MARC imports - Local cover image upload Other image paths: - "Approved" checkmark image on tags review page - Table sort icons on lists page - Feed icon on OPAC search result page - "Loading" image for OPAC plain MARC view Path to ratings JavaScript on OPAC detail and results pages Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Checked all the pages modified by this patch, no problems noted Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This looks good to me, but I am bumping it to 3.14 because I am concerned about the number of files it changes.
(In reply to comment #9) > This looks good to me, but I am bumping it to 3.14 because I am concerned > about the number of files it changes. hmm, i might bump the severity to 'critical', so this bug gets noticed more... i hope no-one objects to this?
(In reply to comment #10) > (In reply to comment #9) > > This looks good to me, but I am bumping it to 3.14 because I am concerned > > about the number of files it changes. > > hmm, i might bump the severity to 'critical', so this bug gets noticed > more... > > i hope no-one objects to this? I do. From http://wiki.koha-community.org/wiki/Bug_Reporting_Guidelines#Severity, the critical severity is defined as "Koha or component crashes and/or there is a potential loss of data". While this definition is a guideline, not an absolute rule, this bug simply does not qualify as a critical bug by that definition. If you want to call attention to a bug, please do so by (for example) discussing it on the IRC channel or koha-devel. Setting the severity of a bug higher than necessary would be a bad habit for us to get into, as it reduces the utility of that BZ field. Consequently, I am setting the severity back to normal. This should not be construed as a statement that I am not going to review the patch; I will, in due course.
I've added bug 10292 as a dependency -- not so much because it is directly related to the patch that was submitted, but because it touches on the specific issue that was originally reported by Doug Dearden.
I've pushed Owen's patch to master. Thanks, Owen! I'm also setting this back to In Discussion, as there are some places that still make hard-coded references to prog. Here is a list of potential candidates for replacing references: ./C4/Record.pm ./C4/Templates.pm ./C4/Koha.pm ./C4/Items.pm ./C4/XSLT.pm ./misc/translator/translate ./misc/translator/LangInstaller.pm ./installer/InstallAuth.pm ./admin/systempreferences.pl ./koha-tmpl/intranet-tmpl/prog/en/includes/error-messages.inc ./koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc ./koha-tmpl/intranet-tmpl/prog/en/css/blue.css ./koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css ./koha-tmpl/intranet-tmpl/prog/en/css/mainpage.css ./koha-tmpl/intranet-tmpl/prog/en/js/ajax.js ./koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/spinelabel-home.tt ./koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt ./koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt ./koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt ./koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt ./koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt ./koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt ./koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl ./koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl ./koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl ./koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARC_compact.xsl ./koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetResults.xsl ./koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl ./koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl ./koha-tmpl/opac-tmpl/gmc/en/xslt/NORMARCslim2OPACDetail.xsl ./koha-tmpl/opac-tmpl/gmc/en/xslt/MARC21slim2OPACDetail.xsl ./opac/unapi ./opac/opac-showmarc.pl ./opac/oai.pl ./catalogue/cardview.pl ./cataloguing/value_builder/marc21_field_008.pl ./cataloguing/value_builder/marc21_field_006.pl ./cataloguing/addbiblio.pl
Comment on attachment 17611 [details] [review] Bug 2774 - Path to theme is hard-coded in many places Marking patch attachment obsolete now that it's been pushed to master, because bug should remain open for additional followup.
Created attachment 18683 [details] [review] Bug 2774 - Path to theme is hard-coded in many places This patch corrects serveral more places in the templates where the path to the prog theme is hard-coded. To test, apply the patch and view the following cases: - When a database update is triggered the login page loads login.css. This path should be correct. (Reference to wizard.css is removed as per Bug 10422). - The course reserves home page should load datatables-related assets correctly. - Help pages for the Quick spine label creator and the staff client home page should show the correct paths where they reference the Koha file system. - The web installer pages should correctly load the Koha logo. - The label creator "manage" pages (layouts, templates, etc.) should correctly load datatables-related assets.
Created attachment 18718 [details] [review] Bug 2774 - Path to theme is hard-coded in many places This patch corrects serveral more places in the templates where the path to the prog theme is hard-coded. To test, apply the patch and view the following cases: - When a database update is triggered the login page loads login.css. This path should be correct. (Reference to wizard.css is removed as per Bug 10422). - The course reserves home page should load datatables-related assets correctly. - Help pages for the Quick spine label creator and the staff client home page should show the correct paths where they reference the Koha file system. - The web installer pages should correctly load the Koha logo. - The label creator "manage" pages (layouts, templates, etc.) should correctly load datatables-related assets. Signed-off-by: Liz Rea <liz@catalyst.net.nz> Checked all 5 - look good.
QA comment: Looks good to me too. I will provide a patch for qa tools in order to avoid another intranet-tmpl or opac-tmpl. Marked as Passed QA.
Created attachment 18728 [details] [review] Bug 2774 - Path to theme is hard-coded in many places This patch corrects serveral more places in the templates where the path to the prog theme is hard-coded. To test, apply the patch and view the following cases: - When a database update is triggered the login page loads login.css. This path should be correct. (Reference to wizard.css is removed as per Bug 10422). - The course reserves home page should load datatables-related assets correctly. - Help pages for the Quick spine label creator and the staff client home page should show the correct paths where they reference the Koha file system. - The web installer pages should correctly load the Koha logo. - The label creator "manage" pages (layouts, templates, etc.) should correctly load datatables-related assets. Signed-off-by: Liz Rea <liz@catalyst.net.nz> Checked all 5 - look good. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment on attachment 18728 [details] [review] Bug 2774 - Path to theme is hard-coded in many places Pushed latest patch to master. Thanks, Owen!
Created attachment 19351 [details] [review] Bug 2774 - Path to theme is hard-coded in many places This patch corrects more places in Koha where the path to the "prog" theme is hard-coded in templates, CSS, and scripts. Staff client home page: Paths to the Koha logo background image and the module image sprite have been corrected. Inactive and hover states of the module links (circulation, patrons, etc) should look correct. addbiblio.pl: An <img> tag is replaced with a text link and an additional CSS class. CSS uses an image-replacement technique to display the image as before. To test, open a blank or existing bibliographic record for editing. Confirm that the "tag editor" icon displays correctly in two cases: 1) tags linked to plugin editors and 2) tags linked to authorities. Both should look correct and work correctly. System preferences: The system preferences editor appends a "loading" image to system preference submit buttons when they are clicked. This patch changes ajax.js to insert a <span> styled with a background-image instead. To test, open system preferences and modify any preference. Submit the change and confirm that the "loading" image appears correctly. Background jobs: Any place in Koha where a background job is used displays a progress bar. This patch corrects the path in CSS to the progress bar image. To test, perform an action which triggers the display of a progress bar. For instance, batch modification of items. Confirm that the progress bar image displays correctly. blue.css: I don't know if this is still used by anyone, but a couple of image paths in this CSS file have been corrected.
Created attachment 19433 [details] [review] Bug 2774 - Path to theme is hard-coded in many places This patch corrects more places in Koha where the path to the "prog" theme is hard-coded in templates, CSS, and scripts. Staff client home page: Paths to the Koha logo background image and the module image sprite have been corrected. Inactive and hover states of the module links (circulation, patrons, etc) should look correct. addbiblio.pl: An <img> tag is replaced with a text link and an additional CSS class. CSS uses an image-replacement technique to display the image as before. To test, open a blank or existing bibliographic record for editing. Confirm that the "tag editor" icon displays correctly in two cases: 1) tags linked to plugin editors and 2) tags linked to authorities. Both should look correct and work correctly. System preferences: The system preferences editor appends a "loading" image to system preference submit buttons when they are clicked. This patch changes ajax.js to insert a <span> styled with a background-image instead. To test, open system preferences and modify any preference. Submit the change and confirm that the "loading" image appears correctly. Background jobs: Any place in Koha where a background job is used displays a progress bar. This patch corrects the path in CSS to the progress bar image. To test, perform an action which triggers the display of a progress bar. For instance, batch modification of items. Confirm that the progress bar image displays correctly. blue.css: I don't know if this is still used by anyone, but a couple of image paths in this CSS file have been corrected. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 19540 [details] [review] [PASSED QA] Bug 2774 - Path to theme is hard-coded in many places This patch corrects more places in Koha where the path to the "prog" theme is hard-coded in templates, CSS, and scripts. Staff client home page: Paths to the Koha logo background image and the module image sprite have been corrected. Inactive and hover states of the module links (circulation, patrons, etc) should look correct. addbiblio.pl: An <img> tag is replaced with a text link and an additional CSS class. CSS uses an image-replacement technique to display the image as before. To test, open a blank or existing bibliographic record for editing. Confirm that the "tag editor" icon displays correctly in two cases: 1) tags linked to plugin editors and 2) tags linked to authorities. Both should look correct and work correctly. System preferences: The system preferences editor appends a "loading" image to system preference submit buttons when they are clicked. This patch changes ajax.js to insert a <span> styled with a background-image instead. To test, open system preferences and modify any preference. Submit the change and confirm that the "loading" image appears correctly. Background jobs: Any place in Koha where a background job is used displays a progress bar. This patch corrects the path in CSS to the progress bar image. To test, perform an action which triggers the display of a progress bar. For instance, batch modification of items. Confirm that the progress bar image displays correctly. blue.css: I don't know if this is still used by anyone, but a couple of image paths in this CSS file have been corrected. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests, QA script and test plan.
Pushed to master. Thanks, Owen!
Latest patch has been pushed to 3.12.x, will be in 3.12.4. Thanks Owen!