Please disregard the 'View article...' shown at the bottom of many posts as this is the result of restoring old forum posts from a backup.

Fatal error with the upgrade to 2.3.0 patch3: Less_Exception_Compiler


Something went crucially wrong with the upgrade from 2.2.3 to 2.3.0 patch3. First I upgraded to 2.30. and the site got some styling issues but otherwise looked ok. Then I added the patch3 (as I have added to other sites) and this time this site went fatally wrong (lost styling totally due to it).

[14-Jul-2014 08:36:39 UTC] PHP Fatal error: Uncaught exception 'Less_Exception_Compiler' with message 'Operation on an invalid type' in /home/mycustomer123/public_html/br/external/less.php/lib/Less/Tree/Operation.php:45

What shall we do to fix this? I have emptied cached in the server, checked the folder "less" and compared with the bootstrap theme


  • Does your custom theme contain any .less files? (/themes/mytheme/less) Did you place any .less files into the system folders (a second or updated copy of bootstrap)?

    Did you empty the /tmp/css folder (which contains the less compiler cache)?

    If this is a Twitter Boostrap 2 based theme, you can try setting a new variable within the /framework/conf/config.php file (if you are able to edit it manually)
    This will switch back to the older less compiler (which doesn't work with bootstrap3). Normally the default for this setting is 'less.php' which is the newer less compiler required for bootstrap3.

    View article...
  • I have copied the folder of "less" from the standard "bootstrap theme".
    I haven't placed any .less files in any other folder than the custom theme folder.
    I emptied several times all caches.

    Yes, the config line to add the older less compiler helps.
    I have still a conflict with jquery that makes the slides not working but otherwise the styles came back with the config define line.

    View article...
  • There shouldn't be a compile problem, but... You're probably loading a 2nd copy of jQuery in your theme/subtheme template. A 'bootstrap' framework theme automatically loads jQuery, so a conflict arises when jquery is loaded twice. You best bet is to NOT load jquery on your theme template, You can load your jquery plugins/addons either by a script line or by using the exp script loader which handles jquery & bootstrap (& yui) modules/plugins/addons using the {script} smarty tag/plugin within in a view template, which is shorthand for the expJavascript::pushToFoot() method.

    View article...
  • Yes, there was also a second copy. Now the site shows only this in which the first one is greyed out. I have commented out the ones I added for the theme (minified one and mobile version).

    <! -- [if lt IE 9] >
    < script src="/br/external/jquery/js/jquery-1.11.1.min.js" >< /script >
    <! [endif] -->
    <! -- [if gte IE 9] ><! -- >
    < script src="/br/external/jquery/js/jquery-2.1.1.min.js" >< /script >
    <!-- <![endif] -- >

    After removing the query in the theme, the slides are not visible at all. Before that the first slide was visible but was not moving.

    What do you mean in this case with "either by a script line"? To add some in the theme itself or where? Any default theme has an example on this?

    View article...
  • The above is a universal script loader since jQuery v2.x is incompatible with Internet Explorer versions earlier than 9. Therefore you are loading jQuery v2.1.1. Is the line (script tag) you are using to load the slideshow addon/script AFTER the expTheme:foot() call? jQuery is NOT loaded until the expTheme::foot() call. This is most likely the issue (open up the browser debug console to see if you get a 'jquery undefined error')

    I'm assuming the 'slides' requires a jquery plugin/addon, correct? Let's assume this slideshow addon is composed of a script (slideshow.js). You could load it in the traditional way by adding a 'script' tag below/after the expTheme::foot() call (jquery is NOT loaded until the foot call) Or you could place the 'slideshow.js' file in the theme/js folder and load it (anywhere in the theme template) using
    This will load the jquery slideshow.js addon first looking in the theme/js folder and eventually looking in the /external/jquery/addons/js folder. It will also load a like-named css/less file from the same parent folder.

    View article...
Sign In or Register to comment.