Crayon Syntax Highlighter
[resolved] Unable to save post - get 404 errors (8 posts)

  1. steve49589
    Posted 4 years ago #

    I'm trying out your plugin, and for some reason whenever I try to save the post or publish the post, I am redirected to my site's 404 page not found.

    Any suggestions?

    I'm using a theme from StudioPress with the Genesis framework.


  2. steve49589
    Posted 4 years ago #

    Actually, some of my code snippets will go in, but others will not.

    This will not work ... add it and I get a 404 error.

    [crayon lang="js"]<div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=YOURFACEBOOKAPPID";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>[/crayon]

    Also, is there a way to wrap the lines? Can't figure that out...


  3. steve49589
    Posted 4 years ago #

    Here is a text file with the full post I'm trying to save or publish. Tried in a basic site and deactivating all plugins - still no joy.

    It must be the way I'm adding the shortcode?

  4. akarmenia
    Plugin Author

    Posted 4 years ago #

    Thanks for that, sorry I didn't see this sooner. I'll need to see if there's an email notification for newly added topics... There sure is a better way now! Use the tag editor button (<>) in the visual editor, or the "crayon" button in the HTML editor. I prefer using the visual editor now, since this integrates nicely and you can even type. When you select a pre tag (which is what it creates Crayons as) it will highlight blue and you can edit the code and settings in tag editor - the same window that you use to create Crayons. You can even switch between HTML and Visual modes and it should all just work.


  5. akarmenia
    Plugin Author

    Posted 4 years ago #

    Oh, and with the tag editor this won't apply since < is encoded to & lt; but if you use plugins that let you put PHP code into posts, then the code in the Crayon may turn into PHP code and cause issues. I had an issue with PHP Exec like this, but like I said with the Tag Editor it won't apply.

  6. akarmenia
    Plugin Author

    Posted 4 years ago #

    Also, that post text works fine for me:


    And if you have HTML and PHP in the same document and want to highlight both, then set the language to html to allow the bits between PHP tag to be rendered as html and bits inside php tags to be php.

  7. steve49589
    Posted 4 years ago #

    akarmenia: This is the issue that I discussed with you via email and it is now resolved.

    It was a server setting issue in ModSec ... not allowing this to work. The server config was changed to allow this by my host.

  8. akarmenia
    Plugin Author

    Posted 4 years ago #

    Oh right, sorry Steve I didn't recognise your username :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Crayon Syntax Highlighter
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic