We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14883 ☆ A M B ☆
    • 450 Posts
    I recently upgraded our site to MODX 2.2.5pl, and CodeMirror to 2.2.0pl.

    My colleague was having trouble saving chunks.

    She narrowed it down to problems with HTML comments.

    I narrowed it down further when I saw that one of her comments had the word 'Insert' inside it.

    30 minutes ago, my heart rate increased as I was able to consistently reproduce this bug by trying to save chunks that had HTML comments with SQL keywords in them.

    <!-- mycomment --> this in a chunk saves just fine
    <!-- myinsert --> this in a chunk saves fine too
    <!-- insert --> this in a chunk DOES NOT SAVE
    <!-- select --> NEITHER DOES THIS
    


    I thought I had discovered a thrilling new bug, somehow related to SQL-Injection security measures. I thought I'd become famous and the bug would be named after me.

    Then, while preparing to write this post and/or file a bug report, I toggled the activation status of CodeMirror and cleared my cache.

    ...and the stupid bug went away. I am no longer able to reproduce it.

    I've never been this disappointed with a bug disappearing.

    Sigh. I guess I'll just wait around and see if it ever returns.
      • 14883 ☆ A M B ☆
      • 450 Posts
      Also: before the bug disappeared, I tested it successfully with the words 'insert', 'delete', 'select'. I verified that it only happened when the words were inside HTML comments and had whitespace before and after. And it only happened in chunks, not in resources. So, pretty sure it is CodeMirror related.