Support » Plugin: Crayon Syntax Highlighter » Incompatible with BlogText

Viewing 1 replies (of 1 total)
  • After some investigations, I found out that it is because of the caching of BlogText. The crayon code id is a uiqid() value determined by the time on the server. However, BlogText would cache a fixed id. So, crayon may not be able to find the source to replace the [crayon-xxxxx/] shortcode.

    I also feel Crayon a bit strange. It registers two hooks in processing the codes. The first one is “the_posts” filter, which processes all the posts everytime we load a page, convert tags into [crayon-xxx/] shortcode. And the second one “the_content” filter, which convert the shortcode into actual code. If any caching mechanism in the_content callback before crayon’s the_content, crayon will be failed to look up the id.

    My workaround now is to disable the caching in blogtext, although may increase the overhead. It seems the only prossible fast solution by hand. I think the most reasonable solution should be replace the id generating of crayon by a deterministic method, e.g. MD5 on the code. This would make the id unchangeable with time, and compatible with any caching plugins

Viewing 1 replies (of 1 total)
  • The topic ‘Incompatible with BlogText’ is closed to new replies.