I am getting the follow error:

"Could not include file: /themes/bootstrap/deprecated.inc"

I get this on every page including admin. No customizations, I just downloaded and installed latest 8x release.

CommentFileSizeAuthor
#4 file-include.png57.68 KBmarkhalliwell

Comments

3dnathaniel created an issue. See original summary.

ettiene’s picture

I just changed
$files = $ancestor->fileScan('/^deprecated\.(inc|inc\.php|php)$/');
to
$files = $ancestor->fileScan('deprecated.inc');
in bootstrap/src/Bootstrap.php on line 804.

It's probably not the correct fix, but since it's looking for the file 'deprecated.inc' I thought there's no need for a regular expression if you can just as well specify the file name.

It worked in my case.

3dnathaniel’s picture

I went ahead and implemented your change and it no longer displays the error.

markhalliwell’s picture

Status: Active » Closed (cannot reproduce)
StatusFileSize
new57.68 KB

Um... the path doesn't even with /, I don't how you're doing that:

markhalliwell’s picture

Title: "Could not include file: /themes/bootstrap/deprecated.inc" » Add setting to load deprecated functions
Version: 8.x-3.0-alpha2 » 8.x-3.x-dev
Category: Support request » Feature request
Status: Closed (cannot reproduce) » Active

It could be a file system issue although, not entirely sure what's going on here. Regardless, some conditional directory separator checks can be added.

Also, this file really shouldn't be loaded unless it's opt-in to begin with.

  • markcarver committed d72cb43 on 8.x-3.x
    Issue #2630550 by markcarver: Add setting to load deprecated functions
    
markhalliwell’s picture

Status: Active » Fixed
marzie’s picture

Hi Mark,

I am also getting this
Could not include file: .... themes/bootstrap/deprecated.inc

I have a new drupal 8 install and using alpha 8.x-3.0-alpha2 2015-Dec-07

It appears to be looking here
htdocs\drupal8/drupal8/themes/bootstrap/deprecated.inc
but there is a deprecated.inc file in the
htdocs\drupal8/themes/bootstrap/ directory.

sorry am new to this hope i can help somewhat.

If you want me to check something let me know
Thanks
M

amirimran’s picture

Hi,

I also got this
Could not include file: /var/www/html/d8/d8/themes/contrib/bootstrap/deprecated.inc

Drupal: 8.0.1 (clean install, no other module or theme installed beside Bootstrap)
Bootstrap: bootstrap 8.x-3.0-alpha2

I replaced Bootstrap with latest dev (Bootstrap 8.x-3.0-alpha2+18-dev) and the error was gone.

This is what i found!
1. As my drupal is installed in sub directory "d8" this is how the path is being printed for include function at line 418 inside includeOnce() in file bootstrap/src/Theme.php

DRUPAL_ROOT: /var/www/html/d8
base_path(): /d8/
$this->getPath(): themes/contrib/bootstrap
$path: /deprecated.inc

Following line at 423 (inside includeOnce() in file bootstrap/src/Theme.php) is creating this include.
$include = DRUPAL_ROOT . base_path() . $this->getPath() . $path . $file;

So from above i see that problem is with DRUPAL_ROOT and base_path() both printing "d8" which is my sub directory for this drupal installation.

base_path() would have only printed "/" if my drupal would not have been in sub directory.

I guess following can solve this in easy way (assuming that DRUPAL_ROOT is supposed to have sub directory in it)

$include = DRUPAL_ROOT . '/' . $this->getPath() . $path . $file;

Note:
For my site i have only configured apache virtual host using this path: /var/www/html/d8/
RewriteBase not defined in .htaccess and neither base_url defined in settings.php

* Bootstrap 8.x-3.0-alpha2+18-dev does add a new check by adding a line at 821 in bootstrap/src/Bootstrap.php as if ($ancestor->getSetting('include_deprecated')) but path problem still remains.

* Bootstrap 8.x-3.0-alpha2+18-dev does not allows me to change theme settings as i am getting following
The website encountered an unexpected error. Please try again later.
i guess that should be unrelated to above problem, but i wanted to re produce this by enabling include_deprecated from settings.

chappy’s picture

Hi amirimran,
I can only confirm your description. Also the fix you suggested works well for me.

Stepan

markhalliwell’s picture

Status: Fixed » Needs work

Hm, guess DRUPAL_ROOT now has the sub-dir included with it... odd. Ok, I'll commit a fix for this.

  • markcarver committed 4597535 on 8.x-3.x
    Issue #2630550 by markcarver: Add setting to load deprecated functions
    
markhalliwell’s picture

Status: Needs work » Fixed
marzie’s picture

@amirimran
Bootstrap Bootstrap 8.x-3.0-beta1 works looks awesome thanks.

When will the sub-theme functionality be looked at? I does not appear to work for me. I.e .Cyborg theme

I then got the error on the index.php page
"The website encountered an unexpected error. Please try again later."

i went to the admin/config/development/performance manually in the browser and cleared the cache.

All looks good now thanks Mark
Regards
M

markhalliwell’s picture

Thanks @marzie, I've created a follow-up issue for #14.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.