I have a theme that has an uploader utility that opens in a popup window from the theme options page. Basically I have a button labeled "Upload" which has an onclick handler that calls window.open to load a popup window containing a php file that handles various upload tasks.
The problem I'm encountering only occurs on less than 1% of all installations of the theme, but I'm unable to determine the cause.
On these sites, the window.open call opens the popup window but the contents of the window is the WordPress default "Not Found" page (instead of my php upload handler file)
Here is the call from functions.php
<button type="button" id="fileUpload" onclick="window.open('<?php echo get_bloginfo('template_directory') ?>/upload-zip.php?action=uploadFile','popup','width=330,height=235,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no'); return false" />Add/Upgrade Templates </button>
Note: to eliminate the upload-zip.php as a source of the problem, I've removed the contents and just placed this into it:
<php echo "in upload file"; die; ?>
However, it does not appear to get to this file before loading the wordpress "Not Found" page.