• After many happy months of using your fantastic plugin, it’s failing with an error:

    pte is not defined
    [Break On This Error] 	
    
    jQuery(function(){ pte.editor(); });

    I assume it’s another plugin that it’s having a conflict with though the prospect of de-installing all the plugins just to have to reinstall and reconfigure is a daunting process. Any suggestions, since the problem exists in the admin?

    I can provide a screen capture for anyone interested in helping.

    Thanks!

    http://ww.wp.xz.cn/extend/plugins/post-thumbnail-editor/

Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Author sewpafly

    (@sewpafly)

    This is caused by another plugin trying to load javascript where it shouldn’t.

    I have seen problems with the WPML plugin, and sent a patch to the developers, but I haven’t had any other plugins reported with problems (even though I know there are some out there).

    If you use google chrome, you can try opening the post thumbnail editor in it’s own window (middle-click on the “thumbnail” option from the media library page) and turn on javascript debugging (F12). Hopefully this shows which plugin created a problem or injected javascript, then we can look for a solution.

    Thread Starter David Radovanovic

    (@dpaule)

    sewpafly, thanks for the quick reply. Here is what appears in Chrome’s Console after F12:

    admin-ajax.php:22Uncaught ReferenceError: pte is not defined
    (anonymous function)admin-ajax.php:22
    f.Callbacks.njquery.js:2
    f.Callbacks.o.fireWithjquery.js:2
    e.extend.readyjquery.js:2
    c.addEventListener.Bjquery.js:2
    Resource interpreted as Image but transferred with MIME type text/html: "http://www.chefsconsortium.com/wp-admin/admin-ajax.php?1679696872".

    Not sure it gives a clue to the offending plugin’s javascript.

    Plugin Author sewpafly

    (@sewpafly)

    Yeah, the njquery thing looks funny… After you press F12, there is also a Script button at the top. There will be a dropdown of different scripts that get loaded. A typical PTE installation should load the following javascript:

    pte.full.js
    jquery.json-2.2.min.js
    jquery.imgareaselect.js
    jquery.js

    If there’s something else hopefully we can track it down based on the filename and content.

    Thread Starter David Radovanovic

    (@dpaule)

    .../wp-admin/admin-ajax.php?action=pte_ajax&pte-action=launch&id=12876&TB_iframe=true&width=640&height=699
    
    .../wp-admin/js/common.js?ver=20120102
    
    .../wp-admin/js/utils.js?ver=20101110
    
    .../wp-includes/js/hoverIntent.js?ver=20090102
    
    .../wp-includes/js/jquery/jquery.js?ver=1.7.1
    Plugin Author sewpafly

    (@sewpafly)

    The one that’s causing the problem is the top one (probably). Can you select that one and then copy/paste the code into a pastebin for me?

    Thread Starter David Radovanovic

    (@dpaule)

    common.js –>

    http://pastebin.com/dVVFqe4X

    Thanks for your help!!

    Plugin Author sewpafly

    (@sewpafly)

    I actually meant the other first one. šŸ˜€ It looks like the plugin is actually injecting it straight into the page, which is the problem, if you select the admin-ajax.php one you’ll probably get a lot of html and javascript, but it might be worthwhile to see it.

    How familiar are you with grep and the command line?

    Thread Starter David Radovanovic

    (@dpaule)

    Give me the command line and I’ll run it…

    Plugin Author sewpafly

    (@sewpafly)

    Can you pastebin the PTE page’s HTML?

    Thread Starter David Radovanovic

    (@dpaule)

    Plugin Author sewpafly

    (@sewpafly)

    Assuming you are in wordpress/wp-content/plugins try running this: find * -iname '*.php' | xargs grep 'warnDelete'

    Thread Starter David Radovanovic

    (@dpaule)

    [user@myserver plugins]$ find * -iname '*.php' | xargs grep 'warnDelete'
    [user@myserver plugins]$
    Thread Starter David Radovanovic

    (@dpaule)

    Did I get the command right?

    Plugin Author sewpafly

    (@sewpafly)

    That’s the right command… Currently I don’t understand where the call for pte.full.js is. It’s missing. The only libraries that are added seem to be stock wordpress ones.

    warnDelete is called in script-loader.php

    Try this command:
    find * -iname '*.php' | xargs grep -li 'wp_default_scripts'

    Thread Starter David Radovanovic

    (@dpaule)

    [user@myserver plugins]$ find * -iname '*.php' | xargs grep -li 'wp_default_scripts'
    [user@myserver plugins]$

    nothing

Viewing 15 replies - 1 through 15 (of 25 total)

The topic ‘[Plugin: Post Thumbnail Editor] pte not defined rror’ is closed to new replies.