Support » Plugins » [Plugin: Crayon Syntax Highlighter] Breaks Excerpt Plugins

  • Resolved PeeDub


    Today I installed the plugin “Advanced Excerpt” and noticed pretty quickly that it wasn’t working. I fiddled with the options, tried using the the_advanced_excerpt() template tag, etc, but no luck. I tried two other excerpt plugins: Better Excerpt and DP Excerpt. Neither of those worked either.

    At this point I began to suspect there was a conflict between those excerpt plugins and one of my other plugins, so I disabled all of my plugins except Advanced Excerpt and it worked perfectly. I began activating my other plugins one-at-a-time until I found the culprit, which turned out to be Crayon.

    I’ve googled around for a solution, but come up empty handed. Anyone have any suggestions for getting these plugins to play nice?

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi, could you provide the version of Crayon you’re using?

    Better Excerpt seems to ignore custom excerpts… With all plugins off, excerpts are generated or the custom one given in the post editor is used. With Crayon it, the Crayon code is just removed from the excerpts but otherwise nothing else changes. With Better Excerpt on, it always generates the excerpts and doesn’t support custom ones, but it still works with Crayon on (you can define length, the “…” and “Read More” text all work). Crayon filters the excerpts with priority 1 so it happens first, any other plugins should be able to the excerpt after that and do whatever.

    For Advanced Excerpt, I found Crayon started recursively adding content into the excerpt. Somehow they are conflicting and the post ends up IN a Crayon… Unticking “Don’t remove any markup” in Advanced Excerpt fixes this, but that might be why you’re using that plugin. It seems to ignore custom excerpts as well though…

    Hello, thank you very much for your time, I really appreciate it. I’m using version 1.9.3 of Crayon. I just setup this site, so all of the plugins mentioned should be the latest version. I’m also using the latest WP: 3.3.2

    Also, please note that I am not using manual (custom) excerpts. All I’m really trying to do is tweak the options (length, read more text, etc) of automatically generated excerpts, such as those that appear on Archive or Search pages.

    It sounds like you’re getting different results than me, and since I’ve done quite a bit of customization on my theme, I decided to test things out on one of the default themes. I went with Twenty Ten, because Twenty Eleven doesn’t automatically put excerpts on the Archive pages.

    I tested with both Advanced Excerpts and Better Excerpts and no matter what settings I turn on or off, neither one works AT ALL with Crayon active. As soon as I deactivate Crayon, either one will work just fine. I even went back and checked using Search results under Twenty Eleven and got the same behavior.

    My wordpress site is running on an Nginx server, so I even tried setting up a new site on an Apache server, but got the same results there too.

    Again, I appreciate your help, and I’ll understand if this isn’t something that’s fixable right now, but I’d sure hate to have to give up using Crayon; it rocks!

    I think I fixed it. Replace “crayon-wp.php” with this one:

    Dude, you are THE MAN!!!

    Yes, it is working perfectly now. Check your paypal buddy, cause the next couple of rounds are on me!

    I’m also going to tell all the ladies about you. 🙂

    Thanks so much.

    Haha glad it worked and thanks a lot for your donation! I’ll be adding some settings to give finer control over the excerpts in 1.9.4. This should make it more flexible since before I was manually generating them or using a custom when available. Now it does neither but ensures the Crayons in them aren’t mixed up from earlier plugins or themes.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Crayon Syntax Highlighter] Breaks Excerpt Plugins’ is closed to new replies.