I am developing a custom theme for my website, and I am unable to see media in grid-view, although I can see the images in list-view.
Secondly, whenever I upload a new image, I get the following three errors:
ERROR 1:
call_user_func_array() expects parameter 1 to be a valid callback, function 'ms_image_editor_default_to_gd' not found or invalid function name
ERROR 2:
Invalid argument supplied for foreach()
ERROR 3:
Cannot modify header information - headers already sent.
This happened to me in the past. Try this out, you can put this in your functions.php
function ms_image_editor_default_to_gd( $editors ) {
$gd_editor = 'WP_Image_Editor_GD';
$editors = array_diff( $editors, array( $gd_editor ) );
array_unshift( $editors, $gd_editor );
return $editors;
}
add_filter( 'wp_image_editors', 'ms_image_editor_default_to_gd' );
There are a few simple things to check:
• There might be an extra return or two after the last ?>
in a PHP file
• Turn off plugins 1 by one and see if that fixes it (you then know where the problem lies)
• If that doesn't work look at the functions.php in both themes
• If that doesn't work try deleting the last ?>