Support » Plugin: Post Thumbnail Editor » [Plugin: Post Thumbnail Editor] pte not defined rror

  • 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.


Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Author 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.

    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
    Resource interpreted as Image but transferred with MIME type text/html: "".

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

    Plugin Author 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:


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

    Plugin Author 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?

    common.js –>

    Thanks for your help!!

    Plugin Author 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?

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

    Plugin Author sewpafly


    Can you pastebin the PTE page’s HTML?

    Plugin Author sewpafly


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

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

    Did I get the command right?

    Plugin Author 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'

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


Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘[Plugin: Post Thumbnail Editor] pte not defined rror’ is closed to new replies.