[Bug 6132] New: System preferences are case sensitive
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Bug #: 6132 Summary: System preferences are case sensitive Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: System Administration AssignedTo: paul.poulain@biblibre.com ReportedBy: julian.maurice@biblibre.com QAContact: koha-bugs@lists.koha-community.org CC: gmcharlt@gmail.com Actually, system preferences are case sensitive. It can be a source of no-easy-to-detect problems and I think it would be better if system preferences were case insensitive. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> 2011-04-08 08:03:59 UTC --- Created attachment 3822 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3822 Patch This patch sets system preferences to be case insensitive. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Patch Status|Needs Signoff |Failed QA --- Comment #2 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-08-11 08:10:43 UTC --- The idea of this patch sounded very good! Unfortunately, this patch does not really make a difference. Just test this without your patch: use C4::Context; print C4::Context->preference('OPACNAV')."\n"; It will print the OpacNav pref too. Why? Because MySQL uses the utf8_general_ci collation here and that collation is case insensitive. So the statement with LOWER(variable)=? is not needed. So, more interesting is now: Where did you have problems with the case of prefs in Koha? Should we do something else there? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> 2011-08-11 08:27:09 UTC --- Marcel, this bit does make a difference + $var = lc($var); if (exists $sysprefs{$var}) { return $sysprefs{$var}; } Hash keys are case sensitive (as are template variables), I agree the lower in the sql is not nessecary, Henri-Damien or Julian can you give us a test plan, or how to recreate the issue please? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|paul.poulain@biblibre.com |julian.maurice@biblibre.com -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #3822|0 |1 is obsolete| | --- Comment #4 from Julian Maurice <julian.maurice@biblibre.com> 2011-12-02 13:14:44 UTC --- Created attachment 6529 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6529 New rebased patch If you call twice C4::Context->preference with the same preference, but with different case, the sql query will be executed twice and global hash %sysprefs will have two different keys for the same system preference. It can causes inconsistencies if syspref is changed between the two calls. Even if it will happen very rarely, at least this patch doesn't introduce new problems (as far as we are sure the sql comparison is case insensitive, because i removed LOWER from the query in this new patch), and it prevents the query to be executed more than once. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Failed QA |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- QAContact|koha-bugs@lists.koha-commun |ian.walls@bywatersolutions. |ity.org |com --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> 2011-12-04 03:56:40 UTC --- As we move to persistent code, as we are, this patch becomes more important. Because the variables will persist for a lot longer, so inconsistent results are more likely to occur. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6529|0 |1 is obsolete| | --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> 2011-12-04 03:57:25 UTC --- Created attachment 6558 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6558 Bug 6132: preference were case sensitive. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Patch Status|Signed Off |Passed QA QAContact|ian.walls@bywatersolutions. |m.de.rooy@rijksmuseum.nl |com | --- Comment #7 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-12-05 08:45:15 UTC --- QA: Looks good. Updating patch status. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Version|master |rel_3_6 Patch Status|Passed QA |Patch Pushed Severity|enhancement |minor --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> 2011-12-06 10:42:07 UTC --- patch pushed, please test (changed severity from ENH to MIN, as it's a bugfix, not an enhancement I think) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 --- Comment #9 from Julian Maurice <julian.maurice@biblibre.com> 2012-01-02 09:55:52 UTC --- Created attachment 7009 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7009 Update sysprefs cache in set_preference
From POD:
C4::Context->set_preference( $variable, $value ); This updates a preference's value both in the systempreferences table and in the sysprefs cache. but the sysprefs cache isn't updated. This patch fix that, applying lowercase to 'variable'. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 --- Comment #10 from Julian Maurice <julian.maurice@biblibre.com> 2012-01-02 09:56:59 UTC --- Created attachment 7010 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7010 unit test Test getting and setting a syspref value, using different case. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Patch Pushed |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6558|0 |1 is obsolete| | Attachment #7009|0 |1 is obsolete| | --- Comment #11 from Chris Cormack <chris@bigballofwax.co.nz> 2012-01-03 06:16:04 UTC --- Created attachment 7019 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7019 Bug 6132: Update sysprefs cache in set_preference Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7010|0 |1 is obsolete| | --- Comment #12 from Chris Cormack <chris@bigballofwax.co.nz> 2012-01-03 06:18:01 UTC --- Created attachment 7020 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7020 Bug 6132: Add unit test for system preferences Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off --- Comment #13 from Chris Cormack <chris@bigballofwax.co.nz> 2012-01-03 06:18:53 UTC --- Works well, 30 bonus points for the unit tests. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|julian.maurice@biblibre.com |jonathan.druart@biblibre.co | |m -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Signed Off |Passed QA --- Comment #14 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2012-01-13 15:08:13 UTC --- QA Comment: Looks good, including a test. patch_status++ -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent |P3 Status|Passed QA |Pushed to Master -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #15 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This fix was included in the 3.6.x branch prior to 3.6.4. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@biblibre.co |julian.maurice@biblibre.com |m | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6132 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED --- Comment #16 from Julian Maurice <julian.maurice@biblibre.com> --- Ok in master, 3.8.x and 3.6.x branches -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org