2

I have followed all steps reported on https://www.drupal.org/node/2598914. However, if I create an new template file in my theme folder, it does not get discovered until I flush the cache manually via drush cr.

Is rebuilding the cache a must to discover new templates, or can I optimize the developer settings to auto-discover templates during development?

  • If you are editing the files (which also means adding files) of a theme that is used from Drupal, then you need to manually clear the cache, or tell Drupal not to use any cache. I would rather uninstall the theme before any edits, and install it back after the edits. – kiamlaluno Apr 16 '17 at 8:17
  • Which of the disabling methods on drupal.org/node/2598914 did you follow? – cilefen Apr 16 '17 at 17:04
  • I have followed all methods. Uninstalling and installing the theme back is a very slow process, just to see my changes. Than cannot be the workflow. What do I need to do, to be able to work on my templates without having the need to constantly rebuild the cache manually? – jepster Apr 16 '17 at 18:18
0

try add this in .htaccess (drupal root)

    <IfModule mod_headers.c>
       //ADD THIS 
        Header set Cache-Control "no-cache, no-store, must-revalidate"
        Header set Pragma "no-cache"
        Header set Expires 0
    </IfModule>
|improve this answer|||||

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.