Chameleon error - Couldn't read file

Chameleon error - Couldn't read file

by Ji Ming -
Number of replies: 2

Does anyone know why that after I set the Chameleon theme as the default theme I see the following error:

"There was an error loading from the server: couldn't read file."

I note that only on the Chameleon main page I see a message that shows the following in the center:

"Chameleon is loading..."

The other themes do not show this message.

When we switch to other themes this error doesn't show. Is there something in the Chameleon theme that can make this event occur?

Using 1.7+

James

Average of ratings: -
In reply to Ji Ming

Re: Chameleon error - Couldn't read file

by Andrew Walker -
Hi,

One of the features of the chameleon theme is that you can edit it directly in your web browser. Any customisations you make are saved into 2 different files, which you should find inside the your_moodle_site/theme/chameleon folder,

temp_user_styles.css and user_styles.css

The "There was an error loading from the server: couldn't read file." error happens if either of these files cannot be read by PHP. Double check the permissions on these 2 files so they are both read and writable by PHP. (If you want to be able to customise the theme from within your browser)

On the other hand, if your intention is to simply use the theme "as is" you probably don't need to do any of this. Instead find the theme config.php file in your_moodle_site/theme/chameleon and in this file, change the line,

$THEME->chameleonenabled = true;

to

$THEME->chameleonenabled = false;

This disables editing, so now the theme should behave like a normal "static" moodle theme.

Note, if you do edit the theme it's definitely recommended to disable the editing once you're satisfied with the changes you made - since pages will load much faster without the overhead of having to include and run all the code that handles editing stuff smile
In reply to Andrew Walker

Re: Chameleon error - Couldn't read file

by Ji Ming -
Thanks a lot Andrew. I'll take a look into the files now.