kc-settings icon indicating copy to clipboard operation
kc-settings copied to clipboard

Color field broken

Open Grawl opened this issue 12 years ago • 5 comments

Just text input and a lot of errors in webkit colsole. WordPress 3.7.1 KC Settings 2.8.5 Safari 7.0 (9537.71) OS X 10.9 build 13A603 2013-11-28 13 27 37 Checked other browsers:

  • Google Chrome 31.0.1650.57 – click on filled rectangle opens native color picker window 2013-11-28 14 06 12
  • Firefox 25.0.1 – same as Safari (text input) 2013-11-28 13 57 33
  • Opera 12.15 build 1748 – click on filled rectangle opens menu with color presets, text input for HEX and a button that opens native color picker window. 2013-11-28 14 02 38

Also, metaboxes is fixed now – I can't move them.

I suggest to use some jQuery plugin for color field. This one looks good.


And here are log from Safari. I just opened console, expanded all spoilers and copied it.

[Error] SyntaxError: JSON Parse error: Unable to parse JSON string
    b (kc-settings-base.min.js, line 1)
    kcGetSNS (kc-settings-base.min.js, line 1)
    kcPFiColor (kc-settings-base.min.js, line 1)
    (анонимная функция) (kc-settings.min.js, line 1)
    c (load-scripts.php, line 3)
    fireWith (load-scripts.php, line 3)
    ready (load-scripts.php, line 3)
    q (load-scripts.php, line 3)
[Error] ReferenceError: Can't find variable: chrome
    global code (functions.js, line 5)
    appendChild
    (анонимная функция) (wp-tinymce.php, line 2)
    run (wp-tinymce.php, line 2)
    add (wp-tinymce.php, line 2)
    init (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    each (wp-tinymce.php, line 2)
    o (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    p (wp-tinymce.php, line 2)
[Error] ReferenceError: Can't find variable: safari
    global code (injectmarker.js, line 35)
    appendChild
    (анонимная функция) (wp-tinymce.php, line 2)
    run (wp-tinymce.php, line 2)
    add (wp-tinymce.php, line 2)
    init (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    each (wp-tinymce.php, line 2)
    o (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    p (wp-tinymce.php, line 2)
[Error] ReferenceError: Can't find variable: safari
    ping (script.js, line 33)
[Error] ReferenceError: Can't find variable: safari
    global code (safari_hooks.js, line 5)
    appendChild
    (анонимная функция) (wp-tinymce.php, line 2)
    run (wp-tinymce.php, line 2)
    add (wp-tinymce.php, line 2)
    init (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    each (wp-tinymce.php, line 2)
    o (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    p (wp-tinymce.php, line 2)
[Error] ReferenceError: Can't find variable: safari
    global code (injected.js, line 169)
    appendChild
    (анонимная функция) (wp-tinymce.php, line 2)
    run (wp-tinymce.php, line 2)
    add (wp-tinymce.php, line 2)
    init (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    each (wp-tinymce.php, line 2)
    o (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    p (wp-tinymce.php, line 2)
[Error] ReferenceError: Can't find variable: chrome
    global code (functions.js, line 5)
    write
    initContentBody (wp-tinymce.php, line 2)
    init (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    each (wp-tinymce.php, line 2)
    o (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    p (wp-tinymce.php, line 2)
[Error] ReferenceError: Can't find variable: safari
    startPurger (adblock_start_safari.js, line 76)
    adblock_begin (adblock_start_common.js, line 172)
[Error] ReferenceError: Can't find variable: safari
    global code (injectmarker.js, line 35)
    write
    initContentBody (wp-tinymce.php, line 2)
    init (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    each (wp-tinymce.php, line 2)
    o (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    p (wp-tinymce.php, line 2)
[Error] ReferenceError: Can't find variable: safari
    ping (script.js, line 33)
[Error] ReferenceError: Can't find variable: safari
    beforeLoadHandler (adblock_start_safari.js, line 47)
    write
    initContentBody (wp-tinymce.php, line 2)
    init (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    each (wp-tinymce.php, line 2)
    o (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    p (wp-tinymce.php, line 2)
[Error] ReferenceError: Can't find variable: safari
    global code (safari_hooks.js, line 5)
    close
    initContentBody (wp-tinymce.php, line 2)
    init (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    each (wp-tinymce.php, line 2)
    o (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    p (wp-tinymce.php, line 2)
[Error] ReferenceError: Can't find variable: safari
    global code (injected.js, line 169)
    close
    initContentBody (wp-tinymce.php, line 2)
    init (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    each (wp-tinymce.php, line 2)
    o (wp-tinymce.php, line 2)
    (анонимная функция) (wp-tinymce.php, line 2)
    p (wp-tinymce.php, line 2)
[Error] ReferenceError: Can't find variable: safari
    send (injected.js, line 164)
    determineInitialState (injected.js, line 62)
    (анонимная функция) (injected.js, line 49)
[Error] TypeError: 'undefined' is not an object (evaluating 'this.$html.hasClass')
    toggleMenu (moby6.js, line 84)
    o (load-scripts.php, line 36)
[Error] TypeError: 'undefined' is not an object (evaluating 'this.$html.hasClass')
    toggleMenu (moby6.js, line 78)
    o (load-scripts.php, line 36)
[Error] TypeError: 'undefined' is not an object (evaluating 'this.$html.hasClass')
    toggleMenu (moby6.js, line 84)
    o (load-scripts.php, line 36)
[Error] TypeError: 'undefined' is not an object (evaluating 'this.$html.hasClass')
    toggleMenu (moby6.js, line 78)
    o (load-scripts.php, line 36)
[Error] TypeError: 'undefined' is not an object (evaluating 'this.$html.hasClass')
    toggleMenu (moby6.js, line 84)
    o (load-scripts.php, line 36)

анонимная функция = anonymous function

Grawl avatar Nov 28 '13 03:11 Grawl

Moved to #13

kucrut avatar Dec 25 '13 20:12 kucrut

@Grawl, I can't reproduce this in Firefox. I don't have Safari so I couldn't test it there. Please try your settings with the latest from master. If the problem persists, please add these lines to your wp-config.php and paste here the errors you see in the inspector:

define( 'WP_DEBUG',    true );
define( 'SCRIPT_DEBUG', true );

kucrut avatar Dec 26 '13 15:12 kucrut

@Grawl, Also, the color picker (and most other JS) is supposed to be a polyfill, so it will only get called when the browser doesn't have the native functionality, that's why you get that color picker from Chrome and Opera :smile:

kucrut avatar Dec 26 '13 15:12 kucrut

@Grawl What do you mean by:

Also, metaboxes is fixed now – I can't move them.

kucrut avatar Dec 26 '13 15:12 kucrut

@kucrut I mean that I can move metaboxes only if color field is not exist.

Grawl avatar Dec 27 '13 01:12 Grawl