WordPress.org

Ready to get started?Download WordPress

Forums

SC Catalog
Apparent JS conflict with WP Editor (7 posts)

  1. HosaDyna
    Member
    Posted 1 year ago #

    When I activate SC Catalog it seems to have some kind of JS conflict with the WordPress editor bar. If I try to do something like clicking the chain icon to add a link, nothing happens on the first try. Then if I click again the screen goes gray and the editor box is way down in the left corner off screen. I can type in the box, but nothing happens when I click to submit. Then I have to hit refresh to unfreeze the screen. I looked at the developer's console and found the errors below. I think it may have something to do with the JS changes in 3.5.
    -------------------------------------
    Uncaught TypeError: Object [object Object] has no method 'uniqueId' load-scripts.php:485
    Uncaught TypeError: Object function (e,t){return new v.fn.init(e,t,n)} has no method 'curCSS' jquery-ui-1.8.17.autocomplete.min.js:9
    (anonymous function) jquery-ui-1.8.17.autocomplete.min.js:9
    (anonymous function) load-scripts.php:2
    v.extend.grep load-scripts.php:2
    ft load-scripts.php:2
    v.fn.extend.filter load-scripts.php:2
    d jquery-ui-1.8.17.autocomplete.min.js:9
    c jquery-ui-1.8.17.autocomplete.min.js:9
    a.ui.version.a.extend.tabbable jquery-ui-1.8.17.autocomplete.min.js:9
    (anonymous function) load-scripts.php:2
    o load-scripts.php:2
    vt load-scripts.php:2
    g.querySelectorAll.vt load-scripts.php:2
    nt load-scripts.php:2
    v.fn.extend.find load-scripts.php:2
    e.widget.open load-scripts.php:485
    (anonymous function) load-scripts.php:69
    e.isFunction.r.(anonymous function).e load-scripts.php:69
    a.widget.open load-scripts.php:486
    (anonymous function) load-scripts.php:69
    (anonymous function) load-scripts.php:69
    v.extend.each load-scripts.php:2
    v.fn.v.each load-scripts.php:2
    e.fn.(anonymous function) load-scripts.php:69
    tinymce.create.open wp-tinymce.php:24
    i.(anonymous function).(anonymous function) wp-tinymce.php:2
    (anonymous function) wp-tinymce.php:32
    k.create.execCommand wp-tinymce.php:2
    i.onclick wp-tinymce.php:2
    (anonymous function) wp-tinymce.php:2
    j wp-tinymce.php:2
    y

    http://wordpress.org/extend/plugins/sc-catalog/

  2. James Revillini
    Member
    Posted 1 year ago #

    Same here, but I don't have that plugin. I thought it might have been that the version of jQuery I had after the upgrade (1.8.5) was too old, so I upgraded jQuery to 1.9 (with the compatibility extension) and jQuery UI.

  3. James Revillini
    Member
    Posted 1 year ago #

    this guy thinks it's a combination of plugins/themes and core conflicting. http://tech.graphicline.co.za/wordpress-3-5-error-uniqueid-is-not-a-function/

    I've turned off script concatenation as suggested elsewhere and have disabled a shit-ton of plugins and am still getting this.

  4. James Revillini
    Member
    Posted 1 year ago #

    I think the issue is that SOMETHING is loading a version of jQuery UI that is older than 1.9 (this is when the uniqueID function was added). I have found a few plugins that seems to do this, and yet while I've commented out the offending code, I'm still seeing version 1.8.5 loaded. You can test by going into the JS console and typing jQuery.ui.version

    Everyone sit back and relax while I grep the hell out of shit and figure this out.

  5. James Revillini
    Member
    Posted 1 year ago #

    OK. Found it. It was XYDAC's Ultimate CMS plugin, which loads jQuery in a way that doesn't check if anything higher has already been loaded. I will file a bug with him, but this issue can be VERY difficult to track down due to the multitude of ways that script can be loaded.

    I'll offer a very generic step by step to figure out where your issue is. I can't help with all the particulars. If you don't understand something, ask a nerd for help.

    • open a page to edit it in the admin
    • open the script console (CTRL+SHIFT+J in chrome)
    • in the editor, highlight some copy and hit the link button
    • confirm that you HAVE the same bug listed above. it will say something like Uncaught TypeError: Object [object Object] has no method 'uniqueId' load-scripts.php:485 - if it doesn't talk about uniqueID not existing, you're in the wrong thread
    • in the JS console, type jQuery.ui.version and hit enter. if it responds 1.9.2, then my advice WILL NOT HELP YOU. you have something else. If it comes back with a number <1.9, YOU HAVE THIS ISSUE.
    • Copy that number
    • use grep to search your wp-content directory for any files (probably PHP files but not necessarily) containing that number
    • you will probably find one or more .js files which contain that number. by looking at the directory they are in, you can start making some assumptions about which plugins and themes are overriding the built-in version of jQuery UI. based on that info, you need to ...
    • find the corresponding PHP files (the most likely culprit) which is loading the shitty old version. now the hard part ...
    • you have options now. can you just disable the plugin without affecting your site? if so, do it - that's the easiest. if you need that plugin, see if there is an upgrade. if so, run it and see if the issue is resolved. if you still have this bug, you really have no option but to reprogram that plugin to either *not* load its own version of jQuery UI or to load the newest, or do some control logic to make a choice based on whatever factors you can come up with. sorry that's not a solid answer, but it's just the way it is.
    • inform the plugin author because they are MOST LIKELY not using the best methods to load scripts. if they had, the built in WordPress dependency system for scripts would have prevented the double-loading of jQuery UI. there is also the possibility that they haven't had time to upgrade the plugin to be compatible with the latest jQuery UI, and if you are talking about a free plugin, then it's just as much your responsibility to figure out how to make it better as it is theirs.
  6. HosaDyna
    Member
    Posted 1 year ago #

    @jrevillini Have you checked out the SC Catalog update that was issued on 1/25/13? It seems to have solved the problem at least for me.

  7. James Revillini
    Member
    Posted 1 year ago #

    No because I have a different plugin causing the issue. My guide above will help anybody solve this issue for whatever plugin or theme is overwriting jQuery UI with an older version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.