WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

    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

Note: to eliminate the upload-zip.php as a source of the problem, I've removed the contents and just placed this into it:

echo "in upload file";

However, it does not appear to get to this file before loading the wordpress "Not Found" page.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.