WordPress CherryFramework lessphp fatal error

On a WordPress site using CherryFramework based theme, was getting following error.

lessphp fatal error: load error: failed to find /home/mediaxtreme/sitedomain.com/wp-content/themes/theme50607/bootstrap/less/bootstrap.lesslessphp fatal error: load error: failed to find /home/mediaxtreme/sitedomain.com/wp-content/themes/theme50607/style.less
Warning: Cannot modify header information - headers already sent by (output started at /home/mediaxtre/public_html/wp-content/themes/CherryFramework/includes/less-compile.php:157) in /home/mediaxtre/public_html/wp-login.php on line 423

This was due the web site have migrated to a new server and the path in new server was differnt than old server.

To fix, edited file

wp-content/themes/CherryFramework/includes/less-compile.php

On line 157, you see following code

        try {
                $less->compileFile($inputFile, $outputFile);
        } catch (Exception $ex) {
                echo "lessphp fatal error: ".$ex->getMessage();
        }

Replace ith with

        try {
                $less->compileFile($inputFile, $outputFile);
        } catch (Exception $ex) {
                # echo "lessphp fatal error: ".$ex->getMessage();
        }

You will be able to login to wordpress admin area. Once you logged in, go to theme settings and just update, this will update the paths. Now you can remove the change you done in less-compile.php

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *