-1

I want Drupal to recognize my new twig files. Trying to clear the cache with the

drush cr 

command gives me a success message. So does manually clicking on "Flush all caches" from the menu. But my new twig files are not being recognized. I was able to clear caches for weeks perfectly fine and it recognized twig files until now. I am using ddev to run my server. I have stopped and restarted the server. Restarted docker. I am using development.services.yml, not services.yml, which from my research I believe is correct. I am also exporting my settings.local.php from my settings.php.

I would like for Drupal to recognize my twig files. Neither clearing the cache by command line with or manually works. No part of the configuration was changed it just stopped working suddenly.

  • Sometimes it is worth to clear cache tables directly in db. Did you try it? – Adamssef Dec 06 '22 at 22:07
  • @Adamssef OP's is talking about twig's cache. These are not stored in the database, but as physical files (in the cache folder passed to the twig options) – DarkBee Dec 07 '22 at 06:49
  • Did you verify that `dursh cr` is actually removing the cache folder provided to twig? You can always remove this one manual or set the option `auto_reload` to `true` whilst developing your website – DarkBee Dec 07 '22 at 06:51
  • Maybe it would help if you could specify the filenames of those twig files and to describe how do you want them to be recognised. Sometimes small typo in the filename may be the problem, but I am just guessing here. – petiar Dec 08 '22 at 07:41
  • @petiar twig's cache files are named randomly e.g. `cache/1d/c9/fb7534198143e29376e00197ceaa3be672c827315e5ddcaab9c51647eff8.php`, so I don't see how your comment is relevant? – DarkBee Dec 08 '22 at 08:07
  • @DarkBee I am not talking about cache files, but the _new twig files_ in the codebase, which are not being recognised, as stated in the question. – petiar Dec 08 '22 at 10:17
  • I'm very sure by "new" OP means modified – DarkBee Dec 08 '22 at 10:21
  • In the question it reads "new". Twice. But I am not a native English speaker so maybe you're right. :-) – petiar Dec 08 '22 at 11:59
  • @petiar No worries, it definitively is double and OP is not providing any more information unfortunately – DarkBee Dec 09 '22 at 12:55

1 Answers1

-3

Most probably, it’s related with permissions. Resetting permissions, perhaps like described in

After drupal update site throws HTTP ERROR 500

might work,

Balde Binos
  • 105
  • 7