I have 2 files with jquery code in custom directory www.mysite.com/files/js/...Every time I clear cache, the files are deleted from server. How is this possible? Anyone came across this issue?

  • Can you post exactly how you are adding the code to your project? And exactly what path is being added? – mpdonadio Jun 10 '13 at 23:17

Files were added using drupal_add_js inside node body using php filter. Path was 'files/js/myfile.js' without using domain name. I resolved it by changing directory name from 'js' to 'js-custom'. I think 'js' directory was created by some module there and was emptied after each cache flush. Now everything works ok.

  • the js dir is apart of core, so it's more than a module – mikeytown2 Jun 12 '13 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.