After doing a git pull, I am often presented with an error about rebuilding, that contains a link to this page: https://drupal.org/documentation/rebuild

As a good citizen, I follow the instructions and replace my settings file and delete my files/php directory (even though drupal was previously installed and working fine, complete with data in the database).

But after following the steps above, I'm presented with a fatal:

 Fatal error: Call to undefined function _system_default_theme_features() in drupal-8.x-dev/core/includes/theme.inc on line 1408

I believe this is because my config directory hash has been regenerated, so the previous theme settings that were saved in the previous config directory are now lost.

Since I assumed this was the case, I deleted my config directories (I now have two) hoping that would clean up the problem, but instead I'm greeted with an even worse error:

Error
The website has encountered an error. Please try again later.

Error message

    InvalidArgumentException: No check has been registered for access_check.permission in Drupal\Core\Access\AccessManager->loadCheck() (line 193 of /Users/jlampton/Sites/_drupal/drupal-8.x-dev/core/lib/Drupal/Core/Access/AccessManager.php).
    Drupal\Core\Config\StorageException: sites/default/files/config_oKNSqvQToNsF3R9yILl74bC1im-6pIEpKdocu8USuSE/active/ not found. in Drupal\Core\Config\FileStorage->listAll() (line 190 of /Users/jlampton/Sites/_drupal/drupal-8.x-dev/core/lib/Drupal/Core/Config/FileStorage.php).

When I encounter this problem my general course of action is to drop the database and start over. Is there any way to recover from this situation? and if not, are we already working on makeing Drupal 8 less brittle? Dropping the db and starting over won't be a viable solution for websites when they are actually running Drupal 8. It's making me nervous.

Thoughts about possible solutions:
- if a cached copy of a function can't be found, use a non-cached copy, or rebuild the cache
- automatically generate a new config directory with the correct hash if it doesn't exist (maybe we are doing this already?)
- fall back to the config that shipped with the module/theme/whatever if a site specific override is not found (but log an error)

Possibly related

#1712250: Convert theme settings to configuration system

Comments

jenlampton’s picture

Issue summary: View changes

orig solution

jenlampton’s picture

Issue summary: View changes

related

dawehner’s picture

Component: theme system » documentation

Came to that issue, because someone mentioned the issue in IRC.
The handbook page is wrong from my perspective, as you should not touch your settings.php, if your drupal site is already installed.
Sadly the same error appears on both a uninstalled drupal page (without a database) and a broken container. Feel free to improve the documentation page: https://drupal.org/documentation/rebuild

jhodgdon’s picture

Component: documentation » base system

Moving back to "base system" for the time being, because if Drupal Core is telling people to use that page, then the core mainatainers need to make sure the information is accurate, and the docs team would not have any idea how to make it more accurate.

dlu’s picture

Component: base system » theme system

Moved to theme system per #2050763-16: Refine "base system" component (notes on refactoring of "base system" category here: https://docs.google.com/a/acquia.com/spreadsheet/ccc?key=0AusehVccVSq2dF...).

shenzhuxi’s picture

Each time I pull from git, I get "Fatal error: Call to undefined function".
I think it's a big problem which frustrate many people who want to help D8.

I use this https://drupal.org/node/2097189 to solve this kind of problem.

shenzhuxi’s picture

Issue summary: View changes

de-snark

star-szr’s picture

Component: theme system » base system
Issue summary: View changes
Status: Active » Closed (duplicate)

As far as I can tell this can be closed as a dupe of #2097189: Add a rebuild script or similar. 'base system' also seems to me like the more accurate component here since it sounds like this error has more to do with bootstrap, config, etc. than the theme layer.

flyke’s picture

This is an old thread, i know. But it is also the first search result in google when i search for the error I recently received on my Drupal 7 site:

Fatal error: Uncaught Error: Call to undefined function _system_default_theme_features() in xxxxx\includes\theme.inc:1430

Since I found out how to fix this, I thought I'd share it here so others with the same error that land on this thread are helped.

I could not reach the site, because it would throw that error.
I also could not use any drush command because it throws the error:

Error: Call to undefined function node_load() in xxxx\includes\menu.inc, line 603

Solution:
Go to your database, and empty all cache tables (so the cache table itself and every table that has a name that starts with cache_)

This fixed it for me.

iulike’s picture

Thanks, @flyke.
#6 worked for me too.

MΙΧALIΣ’s picture

#6 It's good for me too.
I test this solution because with this error I can't connect, can't clear cache with drush.
Thank's.

edit : I have this error and I apply #6 solution with Drupal 7.

shekar.kyatam’s picture

Amazing...... #6 worked for me, thanks flyke

antims’s picture

I also got this error with Drupal 7, and #6 worked for me. Thanks a lot.

jhodgdon’s picture

@antims - did you see comment #6?

In any case... this issue is closed. Maybe someone should file a similar issue for Drupal 7 and see if it can be fixed?

Joe27’s picture

Thank you!, #6 worked for me on Drupal 7.59 .

ericyellin’s picture

In case #6 does not work for anyone:
1. Do #6
2. Run drush updb

Cheers!

ibevamp’s picture

#6 does indeed work.