Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • woluweb Friend
    #188182

    Hi,

    Basically, everytime I want to compile LESS to CSS, I have the following error message :
    “Compile LESS to CSS : “Unexpected error. Please refresh the page try again later.”

    But even when I try later, I get the same msg 🙂

    The problem I relate here occurs in two sites I am developing, one with template JA Mero and the other one with JA OnePage.
    So I think it is quite general to T3-framework…

    I have also tried changing browser just in case (Chrome & IE), but it does not help.

    I have also tried with Developement Mode ON and OFF, but it does not help.

    So I don’t have a clue why I get this error msg…
    But it is very annoying because when I will have to go to production mode, I will have to “switch” to CSS…

    Would it have something to make with special characters (accents, … ?) in the LESS files ?
    Or with the speed/slowness of my server ?
    I don’t think this could be cause, because when I am in development mode, the site takes my less files into account, and I supposed they are then compiled “live”…

    Here two screenshots.

    So please help.


    1. 2013-06-12_14h55_24
    2. 2013-06-12_15h01_20
    woluweb Friend
    #495646

    Hi,
    In order to help, I have investigated futher the problem :

    (i)
    I have also tested after cleaning cache (joomla backend + browser), but it does not help

    (ii)
    One possible problem : access rights to CSS directory ? What should be the access of cssthemes directory (mine is 755).

    (iii)
    In fact, when clicking on Less to CSS button, a directory with my theme name is indeed created in folder cssthemes (with permission 755).
    In this folder I find 15 css files… while the other “ready-to-use” themes of the template come with 25 css files.
    Could it be then that the systems has a problem with the generation of *one* of the CSS files, blocking the rest of the generation of css files ?
    See here the list of generated css files :

    the 15 generated css files for my theme :

    the 25 existing css files for another theme by Joomlart :

    phong nam Friend
    #495738

    Hi,

    <blockquote>Would it have something to make with special characters (accents, … ?) in the LESS files ?
    Or with the speed/slowness of my server ?</blockquote>

    You can send me PM with admin login info of your site, I will check and help you further.

    woluweb Friend
    #495787

    Txs Leo.
    I PM you the details (it will also do for the “search filter” thread :-))
    Marc

    phong nam Friend
    #495868

    Hi,

    <blockquote>Would it have something to make with special characters (accents, … ?) in the LESS files ?
    Or with the speed/slowness of my server ?</blockquote>

    The css styles are compiled successfully after clicking Compile LESS to CSS. So, the simple solution is removing or commenting below line in plugins/system/t3/includes/core/action.php:

    $result['error'] = JText::sprintf('T3_MSG_COMPILE_FAILURE', $e->getMessage());

    * If you enable Development Mode, you DON’T need to click on Compile Less to Css for compiling LESS changes.

    <blockquote>But on my site, whatever filter I set to limit the search (articles, …), the filters are reset when the results are shown (and the results are indeed shown ignoring the filters).
    </blockquote>

    The Joomla search module worked fine on your website when I checked out it. It still keeps the filter option after clicking “Search” button. i.e: i tried with the same keyword “credit”


    1. 3
    woluweb Friend
    #495905

    <em>@Leo Burnetts 376765 wrote:</em><blockquote>Hi,

    The css styles are compiled successfully after clicking Compile LESS to CSS. So, the simple solution is removing or commenting below line in plugins/system/t3/includes/core/action.php:

    $result['error'] = JText::sprintf('T3_MSG_COMPILE_FAILURE', $e->getMessage());

    * If you enable Development Mode, you DON’T need to click on Compile Less to Css for compiling LESS changes.”</blockquote>

    Hi Leo,
    Txs for helping.

    There are two sides in your answer :

    (i) of course, while working in development mode, I don’t need to compile css : the site shows me directly the “LESS version”. But my problem is now that I want to go to production mode. And therefore I need to generate CSS (I guess it goes faster than LESS in dvpt mode…)

    (ii) about the error msg

    if indeed the css files were all correctly generated, then I could as you indicate delete the corresponding PHP error msg (or leave it there and simply ignore the error msg in template manager).

    But I am afraid the css files are not all generated.
    In fact, while testing (by testing, I mean in the end I even deleted the my_personal_theme folder in css before clicking on Compile LESS to CSS), I have had various results :
    – sometimes, the my_personal_theme folder would not even be created
    – sometimes, the folder would be created, but only with a few css files
    – sometimes, I would get up to 15 css files (see screenshot)
    But in any case (even in the last case), I have the feeling that some css files are still missing because the other theme on which mine is based does contain 25 css files…

    I hope my description of the problem is now more complete.
    Txs a lot for your support,

    Marc

    Illustration :
    content of my_personal_theme folder

    content of the css folder of the theme on which my_personal_theme is based (duplicated & personalized)


    1. 2013-06-14_13h11_52
    2. 2013-06-14_13h12_08
    phong nam Friend
    #496818

    Hi Marc,

    I’m really sorry for my late response again. I already transfered your issue to our T3 framework dev team to check & correct it. But, unfortunately, the website got blank when he tried to configure the js functions of warning message with your given admin login. So that, if posible can you send me your FTP account to fix & roll back your website to normal ? Especially, we can correct your server settings to support our Compile LESS feature of T3 framework better. Thanks you, Marc.

    Regards,

    Leo

    woluweb Friend
    #496923

    Okidoki, I sent you the ftp details by PM.
    (I thought I had made it while creating the thread, haven’t I ?)

    For the rest, whatever configuration changes you made (on T3, on Template, on my server, …), just let me know which ones so that I can reproduce these on this website and on the next ones 🙂

    Strange enough : I used to receive the notification emails whenever a post was made on my threads, but I don’t receive them anymore.
    I double checked : my email address is still correct & all my subscriptions are set on “instant”. So where is the problem ?

    phong nam Friend
    #496950

    Hi Marc,

    Thank you for sending me PM. Sure, I will let you know in details how he corrected this LESS issue. For mail notifications, can you check out your spam folder & remove our forum system mail from blocked address if it has ?

    woluweb Friend
    #497052

    Txs Leo.
    LESS is More, they say 🙂
    I hope we find a solution (I already have three sites running on LESS… and there is more to come ! So it is worth understanding & correcting the issue).
    See you soon,
    Marc

    PS : by the way, I double checked the spam (which I do everyday anyway) : I get no notification msg from the forum, while I used to receive them until a couple of weeks ago

    phong nam Friend
    #497296

    Hi woluweb,

    Our T3 developer has confirmed me that the compiling LESS process was not finished successfully as usual on your website because your server settings don’t allow a long-time task execution. As you know, the compiling less process of our T3 framework always takes 20-30 seconds to finish. So that, we suggest you to contact with your hosting provider for any better advices.

    <blockquote>by the way, I double checked the spam (which I do everyday anyway) : I get no notification msg from the forum, while I used to receive them until a couple of weeks ago</blockquote>
    Our forum admin is working to sort these kind of problems, hope you can be patient for this.

    woluweb Friend
    #497302

    Hi Leo,

    Txs for the suggestion of the server setting which could explain the problem. I’ll check this with them (still, I wonder because I have no issue with Akeeba Backup, which can also here and there have long execution time for some of the “queries”).
    If this is true, I guess an easy workaround would be simply to install a local copy (made by akeeba backup for instance), compile LESS to CSS locally and then export the css files to the live website.

    I’ll try both ways (server & local) and give some feedback on this page.
    This can help the other users of the forum.

    Yours,

    Marc

    PS : for the problem of absence of notification coming from the forum, I’ll do my best to be patient 🙂 Txs for the feedback already

    phong nam Friend
    #497349

    Hi Marc,

    <blockquote> would be simply to install a local copy (made by akeeba backup for instance), compile LESS to CSS locally and then export the css files to the live website.</blockquote>
    Right. But remember to turn off Compile LESS to CSS in Template style before exporting css files to your live server. Because the css files will maybe be overriden if Compile Less is turned on.

    * Don’t forget to inform me your result.

    woluweb Friend
    #497351

    So so, here is the result of my investigation :

    1. Scenario “server”

    I guess the parameter you suggested to check with my hosting company was the “maximum execution time”.
    Here is the parameter on my “live site”
    max_execution_time 120 120

    But having tested again the “Compile LESS to CSS”, I get the following message after about 15 seconds (I have made three tests : it gave up after respectively 13, 16 and 14 secs)
    “Compile LESS to CSS : “Unexpected error. Please refresh the page try again later.”

    So 15 seconds being inferior to 120, I guess the cause of the problem is not this famous “max_execution_time”.
    What was then exactly the server parameter which would not be good enough according to the dev team ?

    2. Scenario “local server”

    So I also made a local installation of my website.
    There, good news : no error message “Compile LESS to CSS : “Unexpected error. Please refresh the page try again later.” !

    But still I have now a new question/problem :

    My own LESS theme was a pure duplicate of the original theme called “Light”.
    So I expected the same files in the “csslight” directory and in the “cssmy_own_theme” directory.

    Well, it is not exactly the case : in my “cssmy_own_theme”, I find the same 15 “*.css” files as in “csslight”.
    But there are 10 more files in the “csslight” directory, namely all the “*.min.css” files.

    On http://t3-framework.org/documentation/customization.html I read the following :
    Note: The .min.css files are the compressed files. Your site uses the .min.css files when you enable the Optimize CSS option in the General setting.

    Waouw, I thought we were almost done, piece of cake.

    I enabled the “optimize css” option in my “general settings”, emptied cache of site and of browser (you’re never cautious enough :-)).
    But the *.min.css files did not appear.

    Then I thought maybe I should relaunch the “Compile LESS to CSS” with this “optimize css” option already activated.
    But it did not help : the *.min.css files are still absent.

    So what should be done to generate these *min.css files ?

    woluweb Friend
    #497362

    One step beyond !

    This message is complimentary to the previous one (so read first the previous one :-))

    Making always more tests, I have realised that the button “Compile LESS to CSS” does not only compile the CSS for the Template (Template Style to be precise) on which you are working on, but for all existing LESS folders.

    So on my local server, I made the following test : deleting all subfolders in the /ja_mero/less/themes folder… except the one of my Theme of course.
    Then, click on the “Compile LESS to CSS” button. Result : instead of 1 minute 15 seconds (sic), it only took 15 seconds. Namely 5 times faster ! Logical because there is only one Theme left instead of several.

    Then I tried the same on my real webserver : after 20 seconds, the Compile LESS to CSS was a success !
    Finally ! 🙂

    Still my two questions above remain :
    1. generally speaking, what is the cause of the problem on the server side : max_execution_time or some other variable ? (less urgent question given the temporary solution given above)
    2. I still don’t get the *min.css files (the minified version). So what should be done to generate these *min.css files ? (still very important and urgent question 🙂

    I take the time to give feedback on my solution.
    I hope it might prove useful to some other users who are also struggling with the “Compile LESS to CSS” 🙂

Viewing 15 posts - 1 through 15 (of 24 total)

This topic contains 24 replies, has 3 voices, and was last updated by  Wall Crasher 11 years, 4 months ago.

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