Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Errors #3

Closed
sirkitree opened this issue Nov 13, 2015 · 4 comments
Closed

Fatal Errors #3

sirkitree opened this issue Nov 13, 2015 · 4 comments

Comments

@sirkitree
Copy link

I followed the installation instructions for Drush and updated my local copy of Backdrop to the latest 1.x version.

I then followed your instructions in the README for this repo, creating the commands dir in ~/.drush and checking out this repo (instead of a wget of it's zip).

Within my backdrop installation dir, if I run drush --version I get "This command is not supported yet by Backdrop." So it would seem it's picking it up alright.

If I run drush cc all I get the following fatal errors:

Fatal error: Class 'Drupal\Core\Logger\RfcLogLevel' not found in phar:///usr/local/bin/drush/commands/core/drupal/environment.inc on line 319
Drush command terminated abnormally due to an unrecoverable error.                                                               [error]
Error: Class 'Drupal\Core\Logger\RfcLogLevel' not found in phar:///usr/local/bin/drush/commands/core/drupal/environment.inc, line
319

I also tried installing Drush master using a git checkout instead of using the recommended instructions linked to above. That gave me similar results.

Fatal error: Class 'Drupal\Core\Logger\RfcLogLevel' not found in /usr/local/Cellar/drush/master/commands/core/drupal/environment.inc on line 322
Drush command terminated abnormally due to an unrecoverable error.                                                                                                                                      [error]
Error: Class 'Drupal\Core\Logger\RfcLogLevel' not found in /usr/local/Cellar/drush/master/commands/core/drupal/environment.inc, line 322

I also tried moving the ~/.drush/backdrop dir to ~/.drush/commands/backdrop and received the same results as above.

@quicksketch
Copy link
Member

Doh! Yeah one issue has been that Drush's error log handler doesn't work yet. So you encounter any error, instead of a useful message you get that load of garbage. To get a useful message and find what the problem really is, you can:

  • Open up your directory where drush is installed
  • Find the includes/drupal.inc file and the system_watchdog() function with in it.
  • Add a return right at the top of that function.

Yeah not a great solution but for the time being it's the best I've got. At least then you can try re-running the command and see what the actual problem is. Right now Drush's system_watchdog() is pretty hacky in the first place, but it falls back to assuming D8 and trying to find those classes for RfcLogLevel which don't exist within Backdrop.

@sirkitree
Copy link
Author

Thanks! That totally got me to where I could debug the problem (not drush-based at all) and now the cache clears correctly.

@quicksketch
Copy link
Member

w00t! Yay!

@ghost
Copy link

ghost commented May 17, 2016

Add a return right at the top of that function.

@quicksketch Is this still the recommended solution for when you get the error message from the original post?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants