I have a weird problem that the cache won't be cleared. It all began since I added a template file "field--custom-field-name.tpl.php". The field is attached on user entity type.

I put var_dump(get_defined_vars()) to output the available variables that I could use. I modified the file to begin using some of the variables, and cleared the cache. I found that the page is still showing var_dump output.

I tried:

  • Clearing the cache under performance tab
  • Disabling/Enabling themes
  • Emptying the cache* tables in database
  • Renaming the field template file
  • Deleting the field template file

I don't have Drush, though.

The page just doesn't go back to normal; it just keeps showing the var_dump() output.

How can I fix this?

-Update- admin/reports/dblog has nothing useful, clearing cache has no error output. To me it's like it doesn't remove the var_dump call from cache when I remove/update that field template, and it sticks to somewhere permanently.

I've also checked every file in the same folder, not var_dump or output statements found.

Could it be a bug of drupal cache?

  • besides var_dump, i also put "exit" right after it, could it be the problem that breaks the caching?
    – Xuphey
    Sep 8, 2013 at 16:09
  • can you check your error logs ,path to access error logs admin/reports/dblog . Two things for quick debugging the issue 1. delete existing logs and try clearing the cache and check the logs again, to know if something going wrong in clearing the caches. 2. try loading the page where the field exists for which you had added the template and check the logs again for errors, warning or notices
    – arpitr
    Sep 8, 2013 at 18:56
  • also, if it keeps happening, make sure you don't have another template file of the same name somewhere else in your directory structure that drupal is finding
    – Jimajamma
    Sep 8, 2013 at 19:14
  • Thanks for the answers, I've tried the suggestion and updated the post
    – Xuphey
    Sep 9, 2013 at 4:44

1 Answer 1


The conents of the template files are not cached. So your concern is misplaced.

I am assuming that it is views. Edit the view goto Advanced->Others->Theme Information you can find out which template file is being used. Goto to the file and make the necessary changes or else copy the default file from the views module to the location.

Even if the above is not solving your problem, the var_dump is coming from the database and not code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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