test
Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • dieudonne Friend
    #484021

    @ digimax001 : please read the doc :
    http://t3-framework.org/documentation/t3-settings.html
    Specially the point II : Compile LESS to CSS

    @ Wall Crasher : ok I’ll test it. Thank.

    dieudonne Friend
    #484051

    Hello,

    ok in plugins/system/jat3v3/admin/js/t3v3admin.js we changed this (from line 43 to 69)

    $('#t3-toolbar-recompile').on('click', function(){
    var jrecompile = $(this);
    jrecompile.addClass('loading');
    $.get(T3V3Admin.adminurl, {'t3action': 'lesscall'}, function(rsp){
    jrecompile.removeClass('loading');

    rsp = $.trim(rsp);
    if(rsp){
    var json = rsp;
    if(rsp.charAt(0) != '[' && rsp.charAt(0) != '{'){
    json = rsp.match(/{.*?}/);
    if(json && json[0]){
    json = json[0];
    }
    }

    if(json && typeof json == 'string'){
    json = $.parseJSON(json);

    if(json && (json.error || json.successful)){
    T3V3Admin.systemMessage(json.error || json.successful);
    }
    }
    }
    });
    return false;
    });

    to this (like you say)

    $('#t3-admin-tb-recompile').on('click', function(){
    var jrecompile = $(this);
    jrecompile.addClass('loading');
    $.get(T3Admin.adminurl, {'t3action': 'lesscall'}, function(rsp){
    jrecompile.removeClass('loading');

    rsp = $.trim(rsp);
    if(rsp){
    var json = rsp;
    if(rsp.charAt(0) != '[' && rsp.charAt(0) != '{'){
    json = rsp.match(/{.*?}/);
    if(json && json[0]){
    json = json[0];
    }
    }

    if(json && typeof json == 'string'){
    json = $.parseJSON(json);

    if(json && (json.error || json.successful)){
    T3Admin.systemMessage(json.error || json.successful);
    }
    }
    }
    });
    return false;
    });

    And tried again… start at 13h10. It is 13h43 now and it still running…

    and what is the difference between the new code and existing code ?

    Thank in advance for any help.

    Wall Crasher Developer
    #484117

    Hi dieudonne,

    I have checked your site.
    I think your server is slow for this heavy task.
    I try to call the less compile and it only success serveral time.
    For other, it is 500 Internal Server Error.

    I would like to check the error log of PHP on your server to see what is wrong here.
    Please try to contact to your hosting service and ask about this.
    LESS compile is a heavy progress, and it become more heavy if you have more theme to compile.

    I also attach the correct code of Compile LESS to CSS button

    $('#t3-toolbar-recompile').on('click', function(){
    var jrecompile = $(this);
    jrecompile.addClass('loading');
    $.ajax({
    url: T3V3Admin.adminurl,
    data: {'t3action': 'lesscall'},
    success: function(rsp){
    jrecompile.removeClass('loading');

    rsp = $.trim(rsp);
    if(rsp){
    var json = rsp;
    if(rsp.charAt(0) != '[' && rsp.charAt(0) != '{'){
    json = rsp.match(/{.*?}/);
    if(json && json[0]){
    json = json[0];
    }
    }

    if(json && typeof json == 'string'){
    json = $.parseJSON(json);

    if(json && (json.error || json.successful)){
    T3V3Admin.systemMessage(json.error || json.successful);
    }
    }
    }
    },

    error: function(){
    jrecompile.removeClass('loading');

    T3V3Admin.systemMessage('Unknow error from server');
    }
    });

    return false;
    });

    Regards

Viewing 3 posts - 16 through 18 (of 18 total)

This topic contains 18 replies, has 7 voices, and was last updated by  Wall Crasher 11 years, 9 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum