The 'include' statement for template.php (in the 'themes/engines/phptemplate/phptemplate.engine' file) needs a DRUPAL_ROOT in front of it. Otherwise, trying to run this 'include' when the site is installed in a vhost subfolder fails, with a message such as:
Fatal error: Call to undefined function mytheme_customfunction() in /path/to/site/sites/all/modules/custom/custom_module/custom_module.module on line 67
Attached patch fixes this.
Comment | File | Size | Author |
---|---|---|---|
#2 | phptemplate_init_drupalroot_d8.patch | 514 bytes | Jaza |
phptemplate_init_drupalroot.patch | 494 bytes | Jaza | |
Comments
Comment #1
tim.plunkettThis should be fixed in the latest version.
Comment #2
Jaza CreditAttribution: Jaza commentedPatch for latest D8.
Comment #3
Jaza CreditAttribution: Jaza commentedNew meta-issue for wider discussion of this issue: #1928072: Bootstrapping Drupal from outside the Drupal root directory
Comment #4
mgiffordComment #5
dawehnerThe file check is now done when the Extension is created:
And later in
Extension::load()
Comment #6
dawehner... So we don't longer need it in d8