[Bug 12539] New: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Bug ID: 12539 Summary: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: bgkriegel@gmail.com QA Contact: testopia@bugs.koha-community.org C4/Templates.pm has hardcoded theme -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 --- Comment #1 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 29556 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29556&action=edit Bug 12539: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm This patch removes hardcoded 'prog' from themelanguage on C4/Templates.pm Now that function only provides a fallback to 'en' on active theme (opac & intranet) Also removes a test already done on themelanguage This also breaks definitely CCSR To test: 1) Apply the patch 2) CCSR is now broken, prog & bootstrap must work as usual 3) Need to test language fallback a) translate for your preferred language (xx-YY) b) enable language on opac c) go to opac, select that language d) login on opac, go to personal details e) remove koha-tmpl/opac-tmpl/bootstrap/xx-YY/modules/opac-memberentry.tt d) reload page, must load in English f) click other member options, must load on translated language (can use other pages, prog or bootstrap) 4) Do a similar test but for a staff page, enable lang, switch to it, rm koha-tmpl/intranet-tmpl/prog/xx-YY/modules/admin/admin-home.tt, any page must be translated except for admin home. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|gmcharlt@gmail.com |bgkriegel@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Blocks| |11346 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Yeah, this breaks themes, which im not sure we need to do. We can remove the ccsr and prog themes from the distribution, and change the syspref without breaking it for everyone who has their own custom theme going. I don't think we need to remove the ability to have more than one theme just to deprecate prog and ccsr I would not like to see this patch pushed as it stands My 2 cents -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29556|0 |1 is obsolete| | --- Comment #3 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 30439 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30439&action=edit Bug 12539: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm This patch removes hardcoded 'prog' from themelanguage on C4/Templates.pm It adds a new syspref OPACFallback to hold the prefferred fallback theme for new themes with minimal changes. This does not brake CCSR if new syspref value is 'prog', using 'bootstrap' works somehow, but with strange results. To test: 1) Apply the patch 2) Run updatedatbase.pl 3) CCSR, prog & bootstrap must work as usual 4) Need to test theme/language fallback a) translate for your preferred language (xx-YY) b) enable language on opac c) go to opac, select that language d) login on opac, go to personal details e) remove koha-tmpl/opac-tmpl/bootstrap/xx-YY/modules/opac-memberentry.tt d) reload page, must load in English f) click other member options, must load on translated language (can use other pages, ccsr, prog or bootstrap) 5) Do a similar test but for a staff page, enable lang, switch to it, rm koha-tmpl/intranet-tmpl/prog/xx-YY/modules/admin/admin-home.tt, any page must be translated except for admin home. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to Chris Cormack from comment #2)
Yeah, this breaks themes, which im not sure we need to do. We can remove the ccsr and prog themes from the distribution, and change the syspref without breaking it for everyone who has their own custom theme going.
I don't think we need to remove the ability to have more than one theme just to deprecate prog and ccsr
Agreed. New version preserves the feature. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30439|0 |1 is obsolete| | --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 30481 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30481&action=edit Bug 12539: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm This patch removes hardcoded 'prog' from themelanguage on C4/Templates.pm It adds a new syspref OPACFallback to hold the prefferred fallback theme for new themes with minimal changes. This does not brake CCSR if new syspref value is 'prog', using 'bootstrap' works somehow, but with strange results. To test: 1) Apply the patch 2) Run updatedatbase.pl 3) CCSR, prog & bootstrap must work as usual 4) Need to test theme/language fallback a) translate for your preferred language (xx-YY) b) enable language on opac c) go to opac, select that language d) login on opac, go to personal details e) remove koha-tmpl/opac-tmpl/bootstrap/xx-YY/modules/opac-memberentry.tt d) reload page, must load in English f) click other member options, must load on translated language (can use other pages, ccsr, prog or bootstrap) 5) Do a similar test but for a staff page, enable lang, switch to it, rm koha-tmpl/intranet-tmpl/prog/xx-YY/modules/admin/admin-home.tt, any page must be translated except for admin home. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am not sure why, but I am running into problems here: 1) removed opac-shelves.tt from the German bootstrap translation 2) switched opac to German bootstrap theme 3) tried accessing opac-shelves.pl Template process failed: file error - cssinclude: not found at /home/katrin/kohaclone/C4/Templates.pm line 131. Also and just as a note: It looks to me like the CCSR theme in master is partially broken without the patch already, Firebug shows lots of errors about missing Javascript libraries. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 --- Comment #7 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 30516 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30516&action=edit Bug 12539: Follow up to fix fallback theme The is a problem in the logic, fallback must be: 1. Requested (theme, lang, tmpl) a. return (theme, lang, tmpl), if not b. return (fallback, lang, tmpl), if not c. return (theme, 'en', tmpl), if not as last resort d. return (fallback, 'en', tmpl) Previous patch missed option 'c', worked for CCSR but not bootstrap, sorry. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #8 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to Katrin Fischer from comment #6)
I am not sure why, but I am running into problems here:
1) removed opac-shelves.tt from the German bootstrap translation 2) switched opac to German bootstrap theme 3) tried accessing opac-shelves.pl
Template process failed: file error - cssinclude: not found at /home/katrin/kohaclone/C4/Templates.pm line 131.
Katrin, the followup fix the problem, no sure about the correct status. Switched to Need Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30481|0 |1 is obsolete| | --- Comment #9 from Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> --- Created attachment 31224 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31224&action=edit Bug 12539: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm This patch removes hardcoded 'prog' from themelanguage on C4/Templates.pm It adds a new syspref OPACFallback to hold the prefferred fallback theme for new themes with minimal changes. This does not brake CCSR if new syspref value is 'prog', using 'bootstrap' works somehow, but with strange results. To test: 1) Apply the patch 2) Run updatedatbase.pl 3) CCSR, prog & bootstrap must work as usual 4) Need to test theme/language fallback a) translate for your preferred language (xx-YY) b) enable language on opac c) go to opac, select that language d) login on opac, go to personal details e) remove koha-tmpl/opac-tmpl/bootstrap/xx-YY/modules/opac-memberentry.tt d) reload page, must load in English f) click other member options, must load on translated language (can use other pages, ccsr, prog or bootstrap) 5) Do a similar test but for a staff page, enable lang, switch to it, rm koha-tmpl/intranet-tmpl/prog/xx-YY/modules/admin/admin-home.tt, any page must be translated except for admin home. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |boutrosboutrosboutros@gmail | |.com --- Comment #10 from Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> --- sorry, missed my SO message -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31224|0 |1 is obsolete| | --- Comment #11 from Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> --- Created attachment 31225 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31225&action=edit Bug 12539: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm This patch removes hardcoded 'prog' from themelanguage on C4/Templates.pm It adds a new syspref OPACFallback to hold the prefferred fallback theme for new themes with minimal changes. This does not brake CCSR if new syspref value is 'prog', using 'bootstrap' works somehow, but with strange results. To test: 1) Apply the patch 2) Run updatedatbase.pl 3) CCSR, prog & bootstrap must work as usual 4) Need to test theme/language fallback a) translate for your preferred language (xx-YY) b) enable language on opac c) go to opac, select that language d) login on opac, go to personal details e) remove koha-tmpl/opac-tmpl/bootstrap/xx-YY/modules/opac-memberentry.tt d) reload page, must load in English f) click other member options, must load on translated language (can use other pages, ccsr, prog or bootstrap) 5) Do a similar test but for a staff page, enable lang, switch to it, rm koha-tmpl/intranet-tmpl/prog/xx-YY/modules/admin/admin-home.tt, any page must be translated except for admin home. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30516|0 |1 is obsolete| | --- Comment #12 from Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> --- Created attachment 31226 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31226&action=edit Bug 12539: Follow up to fix fallback theme The is a problem in the logic, fallback must be: 1. Requested (theme, lang, tmpl) a. return (theme, lang, tmpl), if not b. return (fallback, lang, tmpl), if not c. return (theme, 'en', tmpl), if not as last resort d. return (fallback, 'en', tmpl) Previous patch missed option 'c', worked for CCSR but not bootstrap, sorry. Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 --- Comment #13 from Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> --- Rebased updatedatabase.pl. Followed test plan. Removed Norwegian template files on OPAC and intranet - fallback to English works, in all themes, with no issues. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- When I remove koha-tmpl/opac-tmpl/bootstrap/fr-FR/modules/opac-memberentry.tt I got Template process failed: file error - cssinclude: not found at /home/koha/src/C4/Templates.pm line 131. What I missed? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 --- Comment #15 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to Jonathan Druart from comment #14)
When I remove koha-tmpl/opac-tmpl/bootstrap/fr-FR/modules/opac-memberentry.tt I got
Template process failed: file error - cssinclude: not found at /home/koha/src/C4/Templates.pm line 131.
What I missed?
Have you changed OPACFallback to 'bootstrap'? Default value is 'prog', but in this case you need to change it to 'bootstrap' With that it works for me, shows english page. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 --- Comment #16 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Bernardo Gonzalez Kriegel from comment #15)
Have you changed OPACFallback to 'bootstrap'? Default value is 'prog', but in this case you need to change it to 'bootstrap' With that it works for me, shows english page.
The pref is set to prog. I was expecting to get the prog page, but it would have been quite weird indeed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31225|0 |1 is obsolete| | Attachment #31226|0 |1 is obsolete| | --- Comment #17 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31295 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31295&action=edit Bug 12539: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm This patch removes hardcoded 'prog' from themelanguage on C4/Templates.pm It adds a new syspref OPACFallback to hold the prefferred fallback theme for new themes with minimal changes. This does not brake CCSR if new syspref value is 'prog', using 'bootstrap' works somehow, but with strange results. To test: 1) Apply the patch 2) Run updatedatbase.pl 3) CCSR, prog & bootstrap must work as usual 4) Need to test theme/language fallback a) translate for your preferred language (xx-YY) b) enable language on opac c) go to opac, select that language d) login on opac, go to personal details e) remove koha-tmpl/opac-tmpl/bootstrap/xx-YY/modules/opac-memberentry.tt d) reload page, must load in English f) click other member options, must load on translated language (can use other pages, ccsr, prog or bootstrap) 5) Do a similar test but for a staff page, enable lang, switch to it, rm koha-tmpl/intranet-tmpl/prog/xx-YY/modules/admin/admin-home.tt, any page must be translated except for admin home. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 --- Comment #18 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31296 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31296&action=edit Bug 12539: Follow up to fix fallback theme The is a problem in the logic, fallback must be: 1. Requested (theme, lang, tmpl) a. return (theme, lang, tmpl), if not b. return (fallback, lang, tmpl), if not c. return (theme, 'en', tmpl), if not as last resort d. return (fallback, 'en', tmpl) Previous patch missed option 'c', worked for CCSR but not bootstrap, sorry. Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 --- Comment #19 from Jonathan Druart <jonathan.druart@biblibre.com> --- The changes in C4::Templates should have provided unit tests. But I did not manage to write them. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed by Module Maintainer --- Comment #20 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to MM_OPAC/theme_dep -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed by Module Maintainer |Pushed to Master --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches merged into master. Thanks Bernardo! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12539 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org