Bug 9404

Summary: Search of global system preferences deletes css and js code on Save
Product: Koha Reporter: Fred P <fred.pierre>
Component: System AdministrationAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P5 - low CC: gmcharlt
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Fred P 2013-01-16 15:50:22 UTC
Example: Search for "opac" in the global system preferences. The search term "opac" will mysteriously vanish from OPACUserCSS entries that contain the term. Our pseudo-class "#opac-main" becomes "#-main"

The same thing happens when searching for self-checkout css. I am searching for SCO to change the SCOUserCSS. All of my css entries for SCOUserCSS show up with the letter combination "sco" edited out. 

The result of this bug is that when I re-save the css changes, my custom css breaks because the entries are saved as "-main" instead of "opac-main" or "selfhelp" instead of "scoselfhelp"

The same thing happens to custom javascript code. For example in the SCOUserJS: "document.write(myscore);" becomes "document.write(myre);"

The workflow at issue is:
1. Use the same term or letter combination in your custom css or javascript as part of the preference name. Enter your custom css and javascript in the global system preferences.

2. Search for the preference using part of the name.
< Search term drops out of css and javascript >

3. Make a change to the preferences and save.
< site css and javascript suddenly broken >
Comment 1 Fred P 2013-01-16 15:56:01 UTC
Bug 8401 is related.
Comment 2 Owen Leonard 2013-01-16 16:03:53 UTC
Actually this is a duplicate of bug 8401.

*** This bug has been marked as a duplicate of bug 8401 ***