I found a solution.
The image upload page was supposed to be displayed in the JS ThickBox, which wasn’t happening. After a little digging, I found that this was because I had called a JavaScript file from my theme’s functions.php file using
<?php echo '<script type="text/javascript" src="myfile.js"></script>'; ?>
The correct way to call a JS file for a plug-in or theme is to use the wp_enqueue_script() command
<?php
function add_custom_js() {
$dir = get_option( 'siteurl' );
$url = $dir . '/wp-content/themes/themename/my-js.js';
wp_enqueue_script( 'script-name', $url );
}
add_action('init', 'add_custom_js');
?>
This solved my problem completely.