Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Quoting @moshe weitzman from the Drush issue queue.
The safe_join function needs to be enhanced so that does not error when descriptions is empty. Obviously, twig-compile has no value for descriptions. This would be a Drupal core patch.
This currently makes Drush return the below errors:
$ drush @site.env twigc
Invalid argument supplied for foreach() twig.engine:170 [warning]
Invalid argument supplied for foreach() twig.engine:170
FYI, the twig-compile
command compiles all Twig templates.
Comment | File | Size | Author |
---|---|---|---|
#9 | improve_the_safe_join-2540870-9.patch | 2.3 KB | joelpittet |
#9 | interdiff.txt | 1.38 KB | joelpittet |
#9 | improve_the_safe_join-2540870-9--tests-only.patch | 1.19 KB | joelpittet |
#4 | improve_the_safe_join-2540870-4.patch | 1.89 KB | lauriii |
#4 | improve_the_safe_join-2540870-4-test-only.patch | 807 bytes | lauriii |
Comments
Comment #1
joelpittetThis is a good point. Here's a patch. Likely will have to go into 8.1.x?
Comment #2
star-szrSeems fair and also seems like we could test it.
Comment #3
lauriiiWriting tests (adding kittens)
Comment #4
lauriiiComment #6
joelpittetWe may need to add this in a quick bug fix release in 8.0.1 or something... I'm not sure but this is broken as it is.
I'll bump it to 8.1.x if other people run into this then maybe we need to include it early.
Comment #7
alexpottI think given that this creates errors in drush does this not mean this is a contrib project blocker? And something we might want fix during rc?
Is this tested?
Comment #8
joelpittet@alexpott thanks I think it's tested by Twig but not in D8.
https://github.com/twigphp/Twig/blob/1.x/test/Twig/Tests/Fixtures/filter...
Comment #9
joelpittetHere is a test for that too.
Comment #11
star-szrLooks good, tests look to be comprehensive now.
Comment #14
alexpottDiscussed with @catch, @xjm, @effulgentsia and agreed this should be rc target.
Comment #15
alexpottCommitted a53d5aa and pushed to 8.0.x. Thanks!