• Resolved Sean Manion

    (@seanmanion)


    Issue
    I am trying to save a JS code block, but it will not save. The save ‘loading image’ will spin for a long time, then the save ‘diskette’ image will flash to indicate saving needs done.

    Confusion
    1- I am able to save CSS code blocks just fine.
    2- This worked perfectly on a demo site.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author wipeoutmedia

    (@wipeoutmedia)

    Thanks for your message.
    It may be a configuration issue, not sure at this stage.
    We are currently looking into this.

    Kind Regards,
    Damian

    Thread Starter Sean Manion

    (@seanmanion)

    Thanks for the rapid response Damian! Here’s an update:

    If I do Not include <script> in the code block, then save will occur, but will not take effect on the page.

    If I do include <script> in the code block, then save will not occur and will not take effect on the page.

    Here is what I’m trying to add into a JS code block:

    <script src=”http://code.jquery.com/jquery-latest.min.js”></script&gt;
    <script type=”text/javascript”>
    function scaleDown() {

    $(‘.work > figure’).removeClass(‘current’).addClass(‘not-current’);
    $(‘nav > ul > li’).removeClass(‘current-li’);

    }

    function show(category) {

    scaleDown();

    $(‘#’ + category).addClass(‘current-li’);
    $(‘.’ + category).removeClass(‘not-current’);
    $(‘.’ + category).addClass(‘current’);

    if (category == “all”) {
    $(‘nav > ul > li’).removeClass(‘current-li’);
    $(‘#all’).addClass(‘current-li’);
    $(‘.work > figure’).removeClass(‘current, not-current’);
    }

    }

    $(document).ready(function(){

    $(‘#all’).addClass(‘current-li’);

    $(“nav > ul > li”).click(function(){
    show(this.id);
    });

    });

    </script>

    Plugin Author wipeoutmedia

    (@wipeoutmedia)

    Thanks for the info.
    This is strange as the code you provided above is Saving for me. Please send me an email on: support@css-javascript-toolbox.com

    We are starting to wind down the support on the Free edition as we can no longer afford to keep working here, but this seems like a bug and needs to be addressed.

    Thanks very much.

    Kind Regards,
    Damian

    Plugin Author wipeoutmedia

    (@wipeoutmedia)

    If Save does not work on your code, then try checking for errors whilst Saving. A good chance there are 404 (Not Found) errors being thrown. In one of my other test sites this was a server issue due to mod_security rules blocking syntax in one of my test scripts (textillate.js), which in this case was:
    [code]concat([/code].
    You can contact your server if you feel the mod_security policies are too strict, and request that they turn it off. That said, a much better option instead of reducing your security policies just so you can run a script via a code block (code file or code template, etc) is to let CJT call the hosted (your host or via CDN) script externally such as:
    [code]<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>[/code]

    I can’t imagine it to be the <script> tag alone that is stopping code block saving, but you know we can’t fully rule that out in your case. It would be very interesting to know what is causing this.

    Keep me posted.

    Kind Regards,
    Damian

    Plugin Author wipeoutmedia

    (@wipeoutmedia)

    Hi seanmanion,

    Did you manage to get this issue resolved?

    Kind Regards,
    Damian

    Thread Starter Sean Manion

    (@seanmanion)

    Ah.. I think there was something buggy in my server and couldn’t use this. Not an issue with the plugin. We can close this ticket at any time. Thanks for the check up!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘JS CodeBlock not Saving’ is closed to new replies.