[resolved] jQuery.load gives me a 404 Not Found in WPMU (2 posts)

  1. Steven
    Posted 5 years ago #

    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:

    The jQuery code looks like this:

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

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

  2. Steven
    Posted 5 years ago #

    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:

    header('HTTP/1.1 200 OK');

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.