Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Seb Soithongsuk
Seb Soithongsuk
2,190 Points

Help with fatal error after duplicating website

I just duplicated my website to a new domain. The clone is up and running, I can access the back-end and I can edit pages with no issues.

But when I edit the theme, for example the nav bar colour, and save changes, I am faced with the following error:

Fatal error: Uncaught exception 'Exception' with message 'load error: failed to find /home/peakclim/public_html/peakclimbing-computingproject-responsive.com/peakclimbing-computingproject-responsive.com/wp-content/themes/dt-the7_v.4.2.2/dt-the7/css/wc-dt-custom.less' in /home/peakclim/public_html/peakclimbing-computingproject-responsive.com/wp-content/themes/dt-the7_v.4.2.2/dt-the7/inc/extensions/wp-less/lib/vendor/lessphp/lessc.inc.php:1839 Stack trace: #0 /home/peakclim/public_html/peakclimbing-computingproject-responsive.com/wp-content/themes/dt-the7_v.4.2.2/dt-the7/inc/extensions/wp-less/lib/vendor/lessphp/lessc.inc.php(1923): lessc->compileFile('/home/peakclim/...') #1 /home/peakclim/public_html/peakclimbing-computingproject-responsive.com/wp-content/themes/dt-the7_v.4.2.2/dt-the7/inc/extensions/wp-less/lib/Compiler.class.php(81): lessc->cachedCompile(Array, true) #2 /home/peakclim/public_html/peakclimbing-computingproject-responsive.com/wp-content/themes/dt-the7_v.4.2.2/dt-the7/inc/extensions/wp-less/lib/Plugin.class in /home/peakclim/public_html/peakclimbing-computingproject-responsive.com/wp-content/themes/dt-the7_v.4.2.2/dt-the7/inc/extensions/wp-less/lib/vendor/lessphp/lessc.inc.php on line 1839

It seems like it's trying to find the wrong filepath (.../peakclimbing-computingproject-responsive.com/peakclimbing-computingproject-responsive.com/...) and I don't know how it's generating that. I had a look at the line numbers in the files it mentions and it's looking like the .$fname variable is what's generating incorrectly.

It's important to note as well that although this error screen appears, the changes do take place still. But still it would be useful to know why this is happening and how I can fix it.

Please bear in mind my php skills are fairly limited and I'm also new to WordPress as well.

Cheers.

1 Answer

Ian Svoboda
Ian Svoboda
16,639 Points

From what I can see, it looks like you have your path nested when it shouldn't be, as you pointed out. However, this issue specifically appears to be related to the LESS compiler that you are using. It appears to be a plugin, and if so, you could probably just reinstall it as a simple first step.

You may need to troll through your FTP/MySQL database to find the reference, but it seems pretty plausible that you just have a bad path somewhere, especially considering that so much other stuff works.

Let me know what you find out.

Seb Soithongsuk
Seb Soithongsuk
2,190 Points

Cheers Ian for the help. Just letting you know I'm not ignoring your comment, I just haven't got round to looking back into this as I've got my hands full with some other work. I will let you know once I've given it a crack.