I installed drupal using WAMP server so that I could try creating a theme without doing it on my actual website. I made a new theme folder in sites/all/themes and was able to install the new theme. However, I made a change in the theme folder (I only added a logo.png file) and now I can't even load the localhost page. Nothing will load on the browser, and I don't know how to fix it.

Comments

dbeall’s picture

left click on the wamp icon in the task bar and goto the 'www directory' then navigate to your theme directory and remove your change. Then it should work again.
Then you can follow a different method to place the .png file

dbeall’s picture

I would like to add more info about the logo, but I don't know what theme your using or the details about your steps.. or your setup..
here is a good tutorial about creating a theme from a template
http://acquia.com/community/resources/acquia-tv/tips-and-tricks-drupal-t...

m.muryn’s picture

After restarting my computer the localhost seems to load fine.

I am trying to create a simple custom theme, so I am using this wamp server and localhost as a test site. I'm trying to make changes to my theme and see how the changes affect the look of the site. I didn't have a logo image included in my theme folder, so I manually pasted a png image directly into the theme folder. I then refreshed the webpage and it wouldn't load, and from then on the localhost wouldn't load.

Now I realize that there's an option to upload a logo file using drupal's CMS. So I guess my question now is: how do I make a change in my theme files so that the next time I refresh the browser the website loads the new files correctly? For example, while having the webpage open, can I go into the theme folder and change a php file of my current them, and expect the webpage to load correctly when I hit refresh?

btw, what do you mean by my setup? i'm using windows vista if that's what you mean. thanks for your help

vm’s picture

you should be able to add files whenever you want to the theme folder without issue. Many of us do. The admin UI for adding a logo is nice but in long run you will want to add it to your theme directly rather than through the admin ui and code it into your tpl.php files.

What is already included in your theme folder? if nothing? that may be an issue. You should have the required files needed for a theme to run.

I'd suggest useing a base theme that supports subthemes. Zen, Genesis, Fusion and adapative are all really nice base themes that provide for you the ability to build a subtheme and provide all the necessary files.

Adam S’s picture

Drupal has a theme registry. It stores all the information about code functions within the theme. It's there so we can use a naming convention to add a file to the sites folder that will override the core file and put it a specific folder. This saves us from changing any of the core files and consolidates all costum code into one place for easy transport and maintainence. Every time there is a change with a new function or a new file added to the themes directory the registry needs to be rebuilt so it can sniff the changes out. I'm just confusing you now because this is not your problem. As time passes you will need to know that.

You browser stores a cache of images. You will need to clear it every time you make a change because it doesn't load your picture twice. It stores a copy for some time and doesn't bother to check if it's been changed.

Go to /admin/settings/performance and make sure that you are not caching anything. When you become a production site make sure all these are on.

Make sure that you are using firebug for firefox. Also, down load the devel module for Drupal. It works like firebug does and is very useful for advanced theming.

That a png file cause your site to crash is weird. Something else must have happened. There is a button for WAMP that gives you a little menu. You can access the error log from there. Go find the php error log in the php menu of WAMP. Open it up and see if there are any errors. You can look up online how to increase the types of errors recorded on your server to you catch everything through the settings file for php, php.ini, also found there. It will show you a time for the errors.

Just cut and paste the errors into the Drupal forums that are applicable to the moment you had the problem. You will find people having and easier time helping you then. Also, if you take the last part of the error leaving out the personal computer information of the url and google it, you might find all the answers right then and there. 90% of my problems are solved that way.

If your screen is solid white we call that the WSOD which is different than the World Series of Poker.