Support

Account

Home Forums Backend Issues (wp-admin) ReferenceError: wp is not defined in input.min.js

Solved

ReferenceError: wp is not defined in input.min.js

  • Hi @hedgehog

    Are you able to setup another live site on the same server to replicate the issue? It would be great If I could log into a live running site to see the issue with my own eyes and debug via the console log.

    Thanks
    E

  • As I said, I have another live site which is my test one, hosted by the same provider on a different server (so server configuration should be the same), but on such site I’m not having that issue…
    In the next few days I’ll try to copy the live site over once more, in order to try replicating the issue
    Thanks

  • Hi @elliot,

    Has there been any update on this?

    We’re experiencing the exact same error.

    ReferenceError: wp is not defined
    wp-content/plugins/advanced-custom-fields/js/input.js?ver=4.3.2
    Line 339

    Advanced Custom Fields – 4.3.2
    Advanced Custom Fields: Repeater Field – 1.1.1
    WordPress – 3.7.1

  • Don’t know if this helps but the full error from my console is:

    Uncaught ReferenceError: wp is not defined input.js?ver=4.3.2:339
    acf.media.init input.js?ver=4.3.2:339
    (anonymous function) input.js?ver=4.3.2:822
    x.event.dispatch load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:4
    v.handle load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:4

  • I have the same issue when trying to use the upload field on the front end. I have a fresh install of wp and acf is the only plugin running.

  • same issue: ReferenceError: wp is not defined

    WP 3.7, all ACF Plugins up2date. Mix of repeater and flexible content.

    why is this marked solved?

    best regards, LXT

  • Hi guys

    If the wp object does not exist. Do any WYSIWYG fields / image fields work on the page?

    I am still not able to reproduce the error on my end. Would someone be kind enough to email me / comment (private) with login details?

    Thanks
    E

  • Hi @elliot

    I can send you log in details, I’ll do that shortly.

    No, the edit page half loads but the wysiwyg doesn’t along with any media buttons then it looks like it gets stuck in an endless loop of loading. I’ve come across this on two completely separate sites now.

    Thanks
    Rob

  • Hi @robteamworks

    Just to confirm, the page is not compltetly loading, but being cut off?

    It sounds like you have a PHP error / MEMORY limit issue going on which would explain why the wp object doesn’t exist. The wp object is a JS object added by WP – most likely in the footer scripts. If the footer is never rendered, the perhaps your browser is firing the document.ready action without realizing the page is broken!

    Can other confirm this is the same issue?

  • As I said before, it does look like a memory limit issue, however I’m not seeing any debug message with the usual “Allowed memory size of xxx bytes exhausted”.
    I tried increasing memory limit via php.ini, htaccess, wp-config.php with no joy.
    Funny thing is that if I use a relationship field instead of post object or page link, it works fine (and that’s how I solved the issue for the time being…).

    Thanks again Elliot for your support

  • @elliot I’ve also tried all kinds of memory increases but no luck. It definitely seems a problem with ACF rather than any other issue. I’ve emailed you login details so you should be able to see it happening first hand.

  • Hi @robteamworks

    I’m not sure I got your email. Can you email [email protected] with the details and a link back to this thread so I know who it’s from?

    Thanks
    E

  • Hi @elliot, just sent it now – had sent it to [email protected]

    I’ve added some extra info to the email just saying that when the repeater field plugin is disabled everything works fine, when enabled, the problems start.

  • Hi @elliot, did you have any luck with what I sent you?

  • I am experiencing this problem too w/ ACF 4.3.2 on a 3.4.2 WP site I am adding some enhancements to. The problem seems related to image upload, my repeater fields work fine.

    I was able to solve locally 2 ways:
    1. Upgrading to 3.8
    2. Leaving WP at 3.4.2 but installing the ACF 4.1.8 from Github page.

    Not sure if that helps. Hoping I can get the orig. developer to upgrade the live site to 3.8 and that will solve it in my case…

  • @elliot Ok we’ve figured out what the problem is – our site contains 10’s of thousands of posts. When when you have a page link field within a repeater and have it set to all posts (as we have thousands of posts over various post types) it simply times out having to loop through so many posts. This then causes the havoc.

    We’ve limited the page links to only show pages and this solved the problem. It is ideal but at least we’re functional again.

    Is there any other way to stop this happening?

  • Hi @robteamworks

    This will not be an issue in ACF v5 as all page link fields use AJAX to load the posts and will not slow down the page load!

    Thanks
    E

  • We are having this issue on one of our websites. It seems to happen on only one page and only for users that are not administrators. We do not use the repeater fields.

    Elliot if you would like to take a look I’d be more than willing to give you access to our website.

    I just updated to 4.3.3 this morning too and the problem still exists.

  • Hi @vividimage

    Yes please. Can you post a provate comment including details and instructions to see the error?

    Thanks
    E

  • This reply has been marked as private.
  • Hi @vividimage

    It looks like the entire page is breaking after the ‘layout settings’.
    I have a feeling that your theme is causing an error which is then snowballing into ACF’s JS.

    Can you try a change theme to the default one? Does the issue go away?

  • This reply has been marked as private.
  • Hi @vividimage

    Can you please turn on DEBUG_MODE in your wp-config.php file and reload the edit page? Is there are PHP errors on the page? If not, also check the source code.

    Your edit page is breaking after the theme options metabox, which explains why the wp_footer action is never run and the wp JS object is never included (WO includes many JS files in the footer)

    Thanks
    E

  • Hey guys,
    any news here regarding the js-issue?
    Or am I just doing it wrong with using the latest Options Page version but a later an older (4.1.6) version of ACF?

    Best,
    Kevin

  • Hi @Kevin

    Can you please create a new topic with a clear explanation of the issue and login details if possible?

    Thanks
    E

Viewing 25 posts - 26 through 50 (of 67 total)

The topic ‘ReferenceError: wp is not defined in input.min.js’ is closed to new replies.