[Bug 13291] New: Suppress OPACFallback syspref - its use and itself
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Bug ID: 13291 Summary: Suppress OPACFallback syspref - its use and itself Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: frederic@tamil.fr QA Contact: testopia@bugs.koha-community.org Since 'prog' theme doesn't exist anymore, OPACFallback syspref is without object anymore. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think the idea was to avoid a similar problem in the future and also allow poeple to add their own theme and have it fall back to the main theme. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mirko@abunchofthings.net --- Comment #2 from Indranil Das Gupta <indradg@gmail.com> --- *** Bug 13444 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |koha-bugs@lists.koha-commun | |ity.org Component|Architecture, internals, |System Administration |and plumbing | Status|NEW |ASSIGNED CC| |gmcharlt@gmail.com, | |indradg@gmail.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |indradg@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 --- Comment #3 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 40946 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40946&action=edit Bug 13291 - remove prog as fallback theme The 'prog' theme for OPAC was removed from Koha. The OPACFallback syspref was added in 3.18.0 with prog|bootstrap options. This patch proposes to remove the prog option, but still maintain the syspref for reasons outlined in Bug 13291 comment #1. Test plan : run updatedatabase.pl and check the value of OpacFallback under OPAC sysprefs. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Suppress OPACFallback |Remove prog option from |syspref - its use and |OPACFallback syspref |itself | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 40946 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40946 Bug 13291 - remove prog as fallback theme Review of attachment 40946: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13291&attachment=40946) ----------------------------------------------------------------- ::: installer/data/mysql/atomicupdate/bug_13291-remove-prog-as-listed-fallback-theme.sql @@ +1,1 @@
+INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACFallback', 'bootstrap', 'Define the fallback theme for the OPAC interface.', 'bootstrap', 'Themes');
Works fine for systems lacking the system preference, but where's the UPDATE for those which already have it set? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40946|0 |1 is obsolete| | --- Comment #5 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 40947 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40947&action=edit Bug 13291 - remove prog as fallback theme The 'prog' theme for OPAC was removed from Koha. The OPACFallback syspref was added in 3.18.0 with prog|bootstrap options. This patch proposes to remove the prog option, but still maintain the syspref for reasons outlined in Bug 13291 comment #1. Test plan : run updatedatabase.pl and check the value of OpacFallback under OPAC sysprefs. Current patch-complexity: Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40947|0 |1 is obsolete| | --- Comment #6 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 40948 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40948&action=edit Bug 13291 - remove prog as fallback theme The 'prog' theme for OPAC was removed from Koha. The OPACFallback syspref was added in 3.18.0 with prog|bootstrap options. This patch proposes to remove the prog option, but still maintain the syspref for reasons outlined in Bug 13291 comment #1. Test plan : run updatedatabase.pl and check the value of OpacFallback under OPAC sysprefs. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 --- Comment #7 from Indranil Das Gupta <indradg@gmail.com> --- (In reply to M. Tompsett from comment #4)
Comment on attachment 40946 [details] [review] Bug 13291 - remove prog as fallback theme Works fine for systems lacking the system preference, but where's the UPDATE for those which already have it set?
Addressed. Also adds the missing edits to opac.pref. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
select * from systempreferences where variable like '%OPACFallback%'; -- 1 record, should have bootstrap and bootstrap values now.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40948|0 |1 is obsolete| | --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 40949 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40949&action=edit Bug 13291 - remove prog as fallback theme The 'prog' theme for OPAC was removed from Koha. The OPACFallback syspref was added in 3.18.0 with prog|bootstrap options. This patch proposes to remove the prog option, but still maintain the syspref for reasons outlined in Bug 13291 comment #1. TEST PLAN --------- 1) back up DB 2) in sql client: > select * from systempreferences where variable like '%OPACFallback%'; -- 1 record, should have bootstrap and prog choices, and likely prog fallback. 3) at command line: ./installer/data/mysql/updatedatabase.pl 4) in sql client: > select * from systempreferences where variable like '%OPACFallback%'; -- 1 record, should have bootstrap and bootstrap values now. 5) in sql client: > delete from systempreferences where variable like '%OPACFallback%'; -- now there should be no OPACFallback system preference. 6) at command line: ./installer/data/mysql/updatedatabase.pl 7) in sql client: 8) in sql client (substitute your koha database name!): > drop database koha_library; > create database koha_library; > use koha_library; 9) Run web installer 10) in sql client: > select * from systempreferences where variable like '%OPACFallback%'; -- 1 record, should have bootstrap and bootstrap values now. 11) run koha qa test tools Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Amit Gupta <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amitddng135@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I am not sure a syspref with 1 option is really useful. The fallback could be done automatically on the bootstrap theme, don't you think? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, thinking about this, you are probably right. If you have your own set of templates, hardcoding the fallback to the only available OPAC template seems right. OTH if we want to allow people to add other fallbacks and avoid changing files in Koha, this should not be a pull down but a text field? Hm, I feel like I am missing something. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 --- Comment #11 from Indranil Das Gupta <indradg@gmail.com> --- (In reply to Jonathan Druart from comment #9)
I am not sure a syspref with 1 option is really useful.
we already have a related syspref with 1 option - opacthemes
The fallback could be done automatically on the bootstrap theme, don't you think?
We seem to have that already in C4/Templates.pm in the form of my $hardcoded_theme = ($interface eq 'intranet') ? 'prog' : 'bootstrap'; -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 --- Comment #12 from Indranil Das Gupta <indradg@gmail.com> --- (In reply to Katrin Fischer from comment #10)
Hm, thinking about this, you are probably right. If you have your own set of templates, hardcoding the fallback to the only available OPAC template seems right. OTH if we want to allow people to add other fallbacks and avoid changing files in Koha, this should not be a pull down but a text field?
Sounds like a fair argument - like say bootstrap|prog|custom_theme_name The ordering of these could then drive the selection in C4::Templates::themelanguage() Not that it would address Tomas's observation in line 243 about the hardcoding in case of an unpopulated db -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #13 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Indranil Das Gupta from comment #12)
(In reply to Katrin Fischer from comment #10)
OTH if we want to allow people to add other fallbacks and avoid changing files in Koha, this should not be a pull down but a text field?
Sounds like a fair argument - like say bootstrap|prog|custom_theme_name
Yuck, no. Let's not do that. Drop downs prevent people messing up data. If people wish to install custom themes, it has to go in a known directory. Can't we calculate the drop down from the directory, rather than require the list be updated in the opac.pref file? Yes, I know the system preference code might get ugly looking. But I rather have ugly code than bad, hard to debug data. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 --- Comment #14 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Jonathan Druart from comment #9)
I am not sure a syspref with 1 option is really useful. The fallback could be done automatically on the bootstrap theme, don't you think?
Though 1 is kind of silly now, it does allow for bringing back multiple themes in the future. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13291 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to M. Tompsett from comment #13)
(In reply to Indranil Das Gupta from comment #12)
(In reply to Katrin Fischer from comment #10)
OTH if we want to allow people to add other fallbacks and avoid changing files in Koha, this should not be a pull down but a text field?
Sounds like a fair argument - like say bootstrap|prog|custom_theme_name
Yuck, no. Let's not do that. Drop downs prevent people messing up data. If people wish to install custom themes, it has to go in a known directory. Can't we calculate the drop down from the directory, rather than require the list be updated in the opac.pref file? Yes, I know the system preference code might get ugly looking. But I rather have ugly code than bad, hard to debug data.
I think that would be overengineering this a bit. We have other prefs that should not really be changed without knowing what you do. And I wonder what would happen if you enter something wrong - we could always make it fall back to the standard templates. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org