I'am working on porting the twig-for-drupal template engine from 6 to 7 and i used the drupal_get_path function to nicely ask the system where the user placed the twig.engine file.
However, drupal_get_path does dirname(drupal_get_filename.. call, and this function returns false for an external theme_engine. Which could make some sense since theme_engine's aren't registered in the system table. But the query on line 680 in bootstrap.inc returns a "" and this result is tested with a file_exists function on DRUPAL_ROOT. The result is stored in the static $files array. So the array actually has the value set, which prevents the entire fallback starting on line 695 to be passed.
The fix is easy, just add an extra AND clause to the if on 683.
See attached netbeans generated patch file.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | bootstrap.patch | 1.09 KB | rene bakx |
| #2 | bootstrap.diff | 1.09 KB | rene bakx |
| bootstrap.patch | 1.22 KB | rene bakx |
Comments
Comment #2
rene bakxnew patch file, previous patch seems corrupted?
Comment #3
rene bakxnoobish me forgot, .diff should be .patch :(
Comment #4
rene bakxComment #6
rene bakxCan somebody please explain why the patch fails, yet is done like the procedure explains?
Comment #7
tstoecklerThe paths are corrupted. This should read:
Powered by Dreditor.
Edit: added code tag.
Edit2: Fixed typo.
Comment #8
rene bakxAh thank you :) So the patch needs to reference itself! Super!.. Then I will make a new patch on D7-B3 later this weekend.
Comment #9
rene bakxclosing up ancients...