I've found that I can't modify the design any of the pages in any of the themes.
I tried to change the color of the main title. Simple enough right? So I located the CSS for that theme and changed the color. It didn't reflect on the pages though. I restarted Moodle, and yet again.. no dice. I restarted the server itself and still nothing.
I added a few changes in some of the php's, mainly simple echo tests just to see if they would render on the pages. Still nothing.
Is there some secret that I am not aware of to updating these pages? If so please let me know. Any help is appreciated.
Tony
What is your server setup?
Jon
Do you want precise server specs? I'm extremely new to Moodle so I'm not sure exactly what information would best help...
Have you tried downloading the standard theme, making the changes into there and then reuploading with a new name - ie, adding it as a new theme?
Is it possible that I'm just not fully understanding how the PHP's are calling the stylesheets in?
What I'm trying to do at the moment is simply change the color of the title at the top of the page. The
I've confirmed that I'm in the correct CSS as that is what is specified in the config.php. Maybe there's a PHP that is overriding the config.php? I don't know. What I do know is that none of the changes that I'm trying to make are sticking...
Can you check that you have the correct them selected for your site via Administration ► Appearance ► Themes ► Theme Selector (it sounds silly to ask but I have been know to alter a theme setting and get frustrated because I forgot to change it! Also try a refresh and a cache clear, again I've been caught out here!) also check that your theme list is not restricted via Administration ► Appearance ► Themes ► Theme Settings or the course you are viewing (if you are) doesn't have a theme set in the course settings page.
Cheers
Teresa
Hey Teresa,
Thanks for the suggestions. I checked to make sure I was in the right theme, and I was. I also checked to make sure nothing is locked down, and it's not.
I also switched my theme from custom_corners to some others and tried to make modifications, but I came up with the same thing. None of them want to accept any changes.
Is there some specific process to updating these files that I may not know about? I've been making the changes in the CSS, restarting Moodle, and then refreshing the page.. and nothing. I've cleared the cache as well a few times.
Thoughts?
Tony
Moodle is a web site and as such can not be restarted. Are you restarting your web server?
As well as Jon's question can I ask that you confirm the theme folder (full of the appropriate theme files, like config.php) you are modifying is located in '/moodle/theme/' folder (eg. /moodle/theme/mytheme) and that you have sufficient rights to save changes to the files within the folder.
Cheers
Teresa
Which CSS file(s) did you change actually?
You also might try adding "!important" to your changed rules, e.g. h1 {color: fuchsia !important;}, just to make sure your settings won't get overridden somewhere along the way.
hth
Frank
The CSS from the theme is sent to the web browser with instructions to cache it for half an hour. That is why reloading the page does not seem to have an effect. If you clear the browser cache, you should see your changes.
They would alter the code, save, go back to Firefox, do a hard refresh (Ctrl+F5) and nothing changed. It was really frustrating.
Is it possible that something on a Windows install is caching the files at the server level?
Anyway, in the changed code in Moodle 2.0, if you turn on debugging to DEBUG_DEVELOPER, then it no longer caches the theme files.
By the way, in Moodle 2.0 I strongly recommend that theme designers work in DEBUG_DEVELOPER mode. Where I have had to change things from how they worked in Moodle 1.9, I have tried to add debug messages that point out you are doing the wrong things, and tell you what you should do instead. However, those messages only appear in developer debug mode.
Jon Witts- Yes, when I say "restarting Moodle" I was referring to my web server.
Teresa - Yes, I am in the appropriate folder (ex. moodle\theme\custom_corners). Regarding your second question about permissions/rights to modify, I have full rights as I am an admin on that server and in our version of Moodle.
Frank - The theme that I am using is "custom_corners" and I'm trying to modify the "user_styles.css". Just attempting simple changes right now. For example adding 'color: #000000;' to the 'headermain' CSS class to change the title color. It's not accepting the changes. I've even cleared the cache and tried reloading the page, in multiple browsers (IE7, FireFox, Google Chrome). Still no dice. I also tried including "!important" on my changes. Nada.
Tim - I tried clearing my cache on multiple browsers and didn't see any change.
I do have a noobie question about modifying the themes. Can I modify one of the themes that is uploaded into Moodle by default? Or do I have to create my own to have custom changes? There was an article linked in Teresa's last reply to me that sparked this question.
Thank you all for trying to help this noob.
Tony
Answer -yes you can modifiy a Moodle theme that's already there (well, you should be able to anyway ) but it is not advisable as the changes might be overridden when you upgrade to a new version of Moodle. So what you do is download the theme, make the changes, rename it and then upload it as a custom theme that you have made.
Only thing was it rendered with the change that I had made to the title, which was great. But now I'm going through and I'm running into the same issue again. Elements on the page are not updating with the changes I am making in the CSS.
Do I need to reload this theme everytime I make a change to the front end? What is the best way to ensure that edits/mods will occur real time?
-Tony
Some CSS settings can be changed in more than one place. Usually the more specific selector wins over the others. For example the color of the title is set with
h1.headermain {
color:#0066FF;
}
But there's another selector somewhere in the stylesheets with a higher specificity:
#header-home .headermain {
...
}
If you set this to "color: fuchsia;" it will override the first setting (see screenshot).
This feature of CSS (the "cascading" part) might be the cause for your changes not showing.
BTW Are you using Development:Firebug or Themes FAQ#Stylish for CSS changes? These tools are really helpful.
Cheers,
Frank
Thanks for the input. This is one of the things has really been confusing me, because I've done exactly what you suggested a number of times. I've never had trouble updating/editing pages like this.
Here are the steps that I'm taking:
-Stop my web server.
-Modify my CSS, (I've tried modifying headermain and all of the wrapper div css calls; eg. header-home) trying to simply change the color of the title. Adding "color: #990000;". I've also used "!important" to try to give it some sort of priority.
- Save it, restart my web server.
- Dump the cache in the browser and refresh the page... and no dice.
As far as my design tools, I've always been a notepad++ fan. I have FireBug but I've designed web pages using notepad for the past 8 or 9 years or so, using anything else feels like I'm cheating. ;)
Thanks again for the input.
-Tony
Have you solved your problem? Otherwise we need more input.
Frank
So just to review, if a change is made to a CSS theme, it is not reflected until I shut down the moodle server, delete the contents of the moodle tmp folder (\Moodle\server\tmp\) and restart the server.
This is not a problem with browser caching or editing the wrong file.
server/debugging messages is set to developer
styles.php was changed to $lifetime = 1;
using:
###### ApacheFriends XAMPPlite Version 1.7.1 ######
+ Apache 2..2.11
+ MySQL 5.1.33 (Community Server)
+ PHP 5.2.9
+ XAMPPlite Control Version 2.5 from www.nat32.com
+ XAMPPlite Security 1.0
+ XAMPP CLI Bundle 1.3 from Carsten Wiedmann
+ SQLite 2.8.15
+ OpenSSL 0.9.8i
+ phpMyAdmin 3.1.3.1
+ Webalizer 2.01-10
+ Zend Optimizer 3.3.0
+ eAccelerator 0.9.5.3 for PHP 5.2.9 (comment in php.ini)
I don't get what's going on. Its like moodle is caching the themes and never updating them. i'm going to start ripping apart the php unless anyone has an idea.
HALP!!
I've had instances when the CSS chooses to ignore the changes I've made to it, and goes for a default value instead. I use Firefox and a plugin called Firebug which gives an accurate picture of how the CSS works in Moodle.
Most of the time, when I have made changes which, on the face of it, seemed simple enough, the complicated structure of some the themes style sheets makes it impossible to pinpoint where changes have to be made in order to get the result needed. Firebug's 'Inspect Element' shows systematically the parts of the CSS code which relates to the element under inspection. More often than not I found that the browser ignores the CSS in mytheme, and uses values from the Standard theme insead. So no matter how many changes I made to font sizes, or color in my mytheme, the visual result never changed, until I altered the structure of my style sheet.
When you talk about servers and such, then is it not possible to REFRESH the server? One has to do this when making online changes in phpBB (message board OS software).
and YES! Firebug is an excellent tool! don't think I could be a CSS/HTML designer without it... but have you tried also the Web Developer tool? is very handy too! and I actually feel is sometimes "easier" to detect CSS with it than with the Firebug, of course is another Firefox tool, here the link!
https://addons.mozilla.org/en-US/firefox/addon/60
Themes FAQ and CSS FAQ are always good starting points.
@Berenice and Mary
It would be great if you could share you experience by enhancing Development:Firebug or Web developer extension on Moodle Docs. Those are wiki pages so "be bold" as the saying goes
tia
Frank
I had downloaded the package with moodle and xampp for windows. There was no folder called "htdocs". I now installed xampp seperately and then moodle, like seen here: http://docs.moodle.org/en/Windows_installation_using_XAMPP . After this I had "htdocs" and my css-changes are visible!
http://moodle.org/mod/forum/discuss.php?d=125707#p550596
Good luck!
Claudia
You can delete all of this files then restart apache server to solve this problem.
I had the same problem. let me ask you, when you installed moodle did you use the automated install for window where it setup xamp and everything for you. If so then you likely have the problem I did.
For whatever reason the windows installer version does not function right when it comes to checking for changes to themes. follow the step here to install Xamp manually and then moodle. It's not that bad really.
http://docs.moodle.org/en/Windows_installation_using_XAMPP
If you want to retain your existing moodle setup and data, stop at the create the mysql database section and do the following
- Move your existing moodle folder to c:\xamp\htdocs\moodle.
- Move your existing moodledata folder to C:\xamp.
- Copy your existing mysql folder to C:\xamp and say yes to overwrite files.
- Navigate to htdocs\moodle and Open config.php with wordpad.
- set cfg->wwwroot to 'http://<yourIP>/moodle'
- set cfg->dirroot to 'C:\xampp\htdocs\moodle'
- set cfg->dataroot to 'C:\xampp\moodledata'
This whole process took me 15-20mins. so its not bad. Once I started moodle up again and tried to make changes to the themes, a simple refresh of the web browser was all I needed to see changes. Hope this helps.
Hi,
Leo Firebrand
Thank you very much - I appreciate all your help.
But I have a problem when i start the control panel
Apache and FileZilla is starting but Mysql is not starting
It is showing error like
Cannot connect: invalid settings.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
Please help me.............!
I had followed the above steps to transfer the moodle but when i try to open the moodle it is showing the following error!
Error: Database connection failed.
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
You can turn off eAccelerator by editing the php.ini file and adding a semi-colon (to comment out the line) to the beginning of any lines referencing this extension - the applicable lines should be very near the bottom of the configuration.
This will, obviously, stop any pages benefiting from the performance increase of using this extension so you probably only want to do this on development sites.
Hi,
Thanks for your response!
Can you please give me simple steps to transfer the entire
Xampp folder from one system to another...............!
Please help me .......Waiting for your response.
Thanks Regards
Rose Bally
If I ever meet you, I not only owe you a beer, but I'll get you blind drunk for free mate.
After two solid days of ploughing through re-installs of both repo moodle-r2, and packaged moodle installs, after downgrading a xampp from php 5.3 to php 5.2, after reverting to wamp as a last resort, and then back to xampp the next day, after altering file paths, checking my regedit listings, screaming at Firefox, screaming at other developers...
You nailed it.
eaccelerator.enable = "0"
Again, thankyou so much, and also thanks to everyone else for your suggestions.
Hi,
what helped me was navigating to APPEARANCE -> THEMES -> THEME SETTINGS:
and setting theme designer mode to "Yes":
-----------------------------------------------------------------------------------------------------------------------
Normally all theme images and style sheets are cached in browsers and on the server for a very long time, for performance. If you are designing themes or developing code then you probably want to turn this mode on so that you are not served cached versions. Warning: this will make your site slower for all users! Alternatively, you can also reset the theme caches manually from the Theme selection page.
--------------------------------------------------------------------------------------------------------------------------
That would have be a correct answer had this been about Moodle 2.0+ but it wasn't it was about Moodle 1.9. The actual problem was a PHP extension. You can read all about how to fix that bug in this Moodle document Themes FAQ#How can I see theme changes when using the Windows Complete Installer package
However, in Moodle 2.0+ we use Theme Designer Mode like you said, but the eaccelerator PHP extension is still a problem for some systems.
Glad it helped you
Cheers
Mary