Hello everyone!

I'm a newbie for Drupal.
I was asked to make changes on an existing Drupal site, which was created by someone else. Although I've spent couple days learning how Drupal works, I'm still having problems while updating the JS and CSS files.

Info about the existing theme:
The core is 7.x and the base theme is Zen.

------------------

First, I added the following codes in the page--front.tpl.php:

    if ($is_front) { 
       drupal_add_css(drupal_get_path('theme','myThemeName').'/css/leo.css');
       drupal_add_js(drupal_get_path('theme','myThemeName').'/js/leo.js');
    }
    

-----------------

Then, I uploaded the css file, js file, the image, and the updated "page--front.tpl.php" file to the webhost through FileZilla on my computer. (All files are uploaded to the correct directories, image path is correct in the CSS file as well.)

-----------------

First attempt was successful. the Greeting image was displaying properly on the website, and the javascript worked as well (just a simple fade out effect).

Then I was asked to change the JS effect and change to another image, which I did and tested on my localhost. After that, I uploaded the CSS and JS files again, but the changes didn't appear on the site.

Then I searched Google on that issue, and tried the following solutions yesterday:

- Cleared browser caches.
- Cleared all caches using the admin panel on the site
(Config.>Development>Performance).
- Unchecked "Aggregate and compress CSS files" and "Aggregate
JavaScript files".
- Hold Shift and clicked refresh button on the browser many times.

Hours after, nothing is changing on the website...
(I asked the hosting company as well, but they said it's a Drupal thing that I should ask a Drupal expert.)

----------------

Then this morning, I went on the site. The changes I made yesterday was being displayed!
And then I was asked to make changes on the css and image again.

The same issue pops up after I uploaded the CSS file and image file... the changes are not being updated immediately. Then I tried the previous solutions to clear caches and stuffs, waited for couple hours...nothing is changing.

----------------

1. Does anyone know why is the CSS and JS files are not being changed on the site immediately?
2. Is this the correct way to make changes to a custom theme on Drupal? Am I doing it right?

p.s. I've tried adding more CSS in the existing CSS files in the theme (according to the ".info" file in the theme directory), but that didn't work as well.

Could someone help me out please?

Thanks in advance!

Comments

leotse89’s picture

nevermind, issue got fixed! Thank you for reading my thread.