WordPress.org

Support

Support » Multisite » [Resolved] jQuery.load gives me a 404 Not Found in WPMU

[Resolved] jQuery.load gives me a 404 Not Found in WPMU

  • I’ve developed a plugin that works fine on a single site WP.
    But when testing it on WPMU with subdomain, I get a 404 Not Found error.

    The strange thing is that the content is loaded even though I get the error message – but the content is never displayed.

    You can see a screenshot here:
    http://www.stiengenterprises.com/download/tmp/jQuery_load_error.png

    The jQuery code looks like this:

    jQuery.post("/wp-content/plugins/wp-eventcal/eventcal_jquery.php", { instance: 'getEvent', eventID: eventID },
      function(event)
      {
        alert(event); // This never fires
    
      }, "json");

    The alert never fires, but data is retrieved.
    Any suggestions to how I can fix this?

Viewing 1 replies (of 1 total)
  • I got the answer over at Stackoverflow.

    It turns out that I have to include header('HTTP/1.1 200 OK'); directly after require_once($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php');.

    So the code will look like this:

    require_once($_SERVER['DOCUMENT_ROOT'].'/wp-blog-header.php');
    header('HTTP/1.1 200 OK');
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] jQuery.load gives me a 404 Not Found in WPMU’ is closed to new replies.
Skip to toolbar