Ok, this one was driving me nuts… So I’m in WordPress, well this site’s admin actually, trying to edit a post and the Edit / Delete Image buttons for when you hover over an image that is already in your post wasn’t showing. At first I just blew it off, but then this really started to irk me… I really missed this button!
Remedies I tried (but they failed):
- Installed a clean copy of WordPress 3.9.1 to ensure that this button still existed
- Compared database tables in my newly installed WordPress 3.9.1 to this installation and didn’t see anything out of place
- I did some Googleing (of course) and found some threads that implied that a plugin I’m using, TinyMCEAdvanced, was the problem. The simple answer is no, this is not the problem.
- I tried deactivating the plugin
- I tried changing plugin options
- I looked through the plugin code for anything obvious
- I didn’t uninstall the plugin, but that was my next step…
- I looked through every WordPress option I could find, including the hidden options page I talk about in this post.
This was a palm-to-face moment for me… Mainly because I hadn’t thought to try this one yet. But the culprit was a plugin that I forgot I had installed and missed every time I looked through the plugin list to see if one of those were the culprit…. The plugin was Code Blocks. (EDIT: This plugin is no longer an issue as of version 0.3 – see the update below) I was using this to add blocks of code to the site. It was simply adding some HTML code to a section of the post that I wanted styled as code, and would style it in the editor as well which was nice. But I’m quite certain there are others out there that will do this as well, and I’ll have to find a replacement for it later tonight. Thankfully with the plugin deactivated it still displays the posts to the viewers correctly.
Moral of the story:
The bottom line, is that when you run into strange issues in WordPress, start to break it down with what might be the source of the problem. Most of the time, it’s a plugin that is affecting how things operate. That is the rabbit hole path I took to find the solution, but I got too distracted by one or two random old threads that implied that might be the issue that I overlooked the simple and obvious one – the other plugin that is affecting the WordPress Post Editor tools.
Thank you to Subin Siby for fixing the bug in the plugin. See his comment below. I tested out the new version and it works perfectly! And this is good, because I did look for a replacement plugin but couldn’t find a quality option. There are some cool plugins and methods that do code highlighting, but they are all more effort than Subin Siby’s Code Blocks plugin. I may look at code highlighting options in the future, but for now this serves my purpose well! (and actually many of the code highlighting options use similar methods as Code Blocks in that it uses <pre><code> tags with extra parameters. So the two could mix well if needed.)