Initially I was planning to do this as part of my WordPress 2.3 upgrade, but since I decided to postpone that, I wanted to have it “here and now”.
Unfortunately, after copying and enabling the plugin, I was very frustrated to see that there’s no “edit comment” AJAX functionality at all. Neither for registered users, neither for the Admin, nor for any regular user. I was slightly disappointed, but I decided to investigate the issue.
First, I blamed my theme. Since it’s custom theme, I thought that the nice “comment preview” code screwed up the plugin. I put the plugin in test blog and there it worked like a charm. So I copied the theme from the test blog and applied it on mine. Alas, nothing again. It was not the theme (but at least one thing less to blame).
I left the theme active and I disabled all plugins except WP Ajax Edit Comments. It immediately worked. So it was something worse: __plugin-to-plugin conflict__. I started to switch on the rest of the plugins, each time refreshing a page with comments. I was _very surprised_ to see that the PHP Markdown plugin caused the issue. Once I enabled it, all nice edit comment AJAX functionality vanished again.
I was very disappointed. I desperately need that plugin to work, because most of my articles are written with the flexible and easy Markdown formatting rules. So I decided to try saving the day and achieving both Markdown and WP Ajax Edit Comments to work.
My first action was to update the Markdown plugin to its last version. That, unfortunately, did not help – still both plugins conflicted somehow, causing WP Ajax Edit plugin to fail injecting the functionality. Then I decided to install Markdown Extra plugin, hoping that it would work. Alas, failure again – the same miserable conflict.
Then I dug a bit inside Markdown Readme. Inside the readme I saw that you can actually switch off Markdown only for your comments (yes, by default Markdown works on the comments as well). From Markdown readme:
> ### WordPress-Specific Settings ###
> By default, the Markdown plugin applies to both posts and comments on
> your WordPress weblog. To deactivate one or the other, edit the
> _MARKDOWN\_WP\_POSTS_ or _MARKDOWN\_WP\_COMMENTS_ definitions under the
> “WordPress settings” header at the start of the “markdown.php” file.
I did that and disabled _MARKDOWN\_WP\_COMMENTS_. Woot! It immediately worked and I saw the AJAX commands from the Edit Comments plugin.
Well, that was what I actually needed. I will miss Markdown in my comments (only God knows how many times since now I will comment with Markdown in my blog, and then will edit the comment :-)). But comment’s editing is something extremely nice and it will benefit everybody, so I will have to live with that configuration.
The saga is not yet over: I am planning to notify both authors for this incident and I hope the (any) of the plugins will be fixed, so they live together with their full blown functionality. I also posted this issue in WordPress support forums. Stay tuned!