views:

60

answers:

1

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); // For testing - never fires

  }, "json");

Any suggestions to how I can fix this?

.htaccess

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

# END WordPress
+2  A: 

This problem happens because your eventcal_jquery.php is not included to the Wordpress framework, so when it called, wp returns 404. Just include header('HTTP/1.1 200 OK'); after including wp-blog-header.php in your eventcal_jquery.php

Pavel Velikiy
Dang! It worked! You have no ida how much I've struggled with this! Thanks you so much! :) Next time you are in Norway, I'll buy you a beer! :)
Steven