I am having a strange issue with the built in wordpress image editor. I have no problem uploading files or preforming any other media functions. The only thing I seem to be unable to do is utilize the image “edit” capabilities (the area where you can crop, resize, rotate…)
When I click on “edit” for an image I see the editor and I see the thumbnail on the right, wordpress just won’t show me the actual image in the main area and thus I can’t utilizing any of the editing capabilities.
I am assuming this must be some type of JavaScript conflict however I not sure the best way to diagnose this other than what I have already done (disabling all plugins and ensuring no functions.php file is modifying a setting or including other javascript).
How can I diagnose this issue to see what might be going wrong?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
I have actually managed to resolve my own problem. For anyone else that might ever read this the problem which caused this was that my functions.php file had a closing
?>
at the very end. For whatever reason this is what cause the issue and by removing this last line it was working again.
Method 2
Yes, the problem is the PHP closing tag (?>) in functions.php.
However, if in functions.php there are many inclusions which in turn include other PHP files, it is unthinkable to remove all PHP closing tag in all files.
So, my advice is add in the first line of functions.php the php function ob_start() and in the last line ob_end_clean() by removing the closing PHP tag.
Everything will work perfectly.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0