Today I decided to install WP Ajax Edit Comments plugin in my blog. I saw similar functionality few months ago at Emuto’s blog (in Bulgarian), and I decided it would be nice to have it here too.
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!
One update though: I just saw that in my test blog I also have Markdown enabled, so maybe there’s third plugin, which causes these two to stop working. At the moment I have installed and enabled:
* del.icio.us cached++ 1.2.1
* FeedStats 2.1
* Full Text Feed 1.03
* Gravatar 1.1
* Maintenance Mode 3.1
* Markdown Extra 1.1.7
* Snap Preview AnywhereTM Plugin 1.2
* Spam Karma 2 2.3 rc1
* Spoiler Plugins for WordPress 1.5 0.2rc3
* Subscribe To Comments 2.1
* Text Replace 0.91
* WeatherIcon 2.0.1
* Witty Text 1.0
* WP AJAX Edit Comments v1.1.1.2
In this combination, enabling Markdown Extra with markdown in the comments causes WP Edit Comments to stop working.
@Doncho: Are you telling me that now this won’t work anymore??
Ah, it works. Perfect…
@Vlado: It works :). What will not work is adding comments with Markdown syntax. But since no one used this (except maybe me), it’s all cool, isn’t it? And I was thinking for adding some Javascript formatting buttons anyway later :).
I hope it work with my comment too “joking” lovely blog by the way,
cheers,