Getting VERY strange AJAX/JS 404 errors I'm at a loss as to what could possibly be wrong, but I'm definitely seeing some crazy 404 errors, all of which seem to stem from /user/0/orders

For example, if I add a page using the CKeditor for the body, then edit it, the console error will be POST http://www.mysite.com/user/0/orders 404 (Not Found) and the CKeditor will not be displayed.

I'm also receiving an error on some autocomplete fields as follows:

An AJAX HTTP error occurred. 
HTTP Result Code: 404. 
Debugg information follows.
Path: http://www.mysite.com/user/autocomplete
StatusText: Not Found
...
Page not found
The requested page "/user/0/orders" could not be found.
...


Anyone have a suggestion I might try?

Thanks.
Ok well I seem to have "solved" the issue. 

I had a node with the following PHP code to take the user to their order page when accessing user/me/orders:

&lt;?php
  global $user;
  $orderpath = 'user/'.$user-&gt;uid.'/orders';
  drupal_goto($orderpath);
?&gt;


When I deleted that PHP code, everything started working again. 

Anyone know why the above code could cause the problems indicated in my question?