Skip to content
GitLab
Explore
Sign in
This is an archived project. Repository and other project resources are read-only.
Changes
Page history
Update Drupal Debug Hints
authored
Mar 14, 2022
by
Tom Wiesing
Show whitespace changes
Inline
Side-by-side
Drupal-Debug-Hints.md
0 → 100644
View page @
8c689933
Because drupal frequently misbehaves, here is a list of useful snippets.
This isn't intended for end-users of the distillery, but just listed here so we don't have to keep searching for it.
# Enable Stack Traces
The DSOD usually only says
`The website encountered an unexpected error. `
When
`Reports > Recent Log Messages`
is inaccessible, you can enable full stack traces.
Run
`vim web/sites/default/settings.php`
and add:
```
php
$config
[
"system.logging"
][
"error_level"
]
=
"verbose"
;
```
Might have to ignore the readonly flag (with
`:w!`
).
# Manually disabling a module
When doing manual migrations or upgrades, an error like the following can occur
```
(Currently using Missing or invalid modules The following modules are marked as installed in the core.extension
configuration, but they are missing:
```
To fix this, either re-install the module (using composer and friends) or run this code to disable it:
```
php
drush
eval
"
\$
modname='id-of-module';
\$
module_data = \Drupal::config('core.extension')->get('module'); unset(
\$
module_data[
$modname
]); \Drupal::configFactory()->getEditable('core.extension')->set('module',
\$
module_data)->save();"
```
# Factory SSH Forwarding
To portforward all services you can use the following ssh command:
```
ssh -L 3306:sql:3306 -L 7200:triplestore:7200 -L 8080:phpmyadmin:80 -p 2222 slug@wisski.agfd.fau.de
```
This forwards:
-
[
GraphDB on `localhost:7200`
](
http://localhost:7200
)
-
[
PhpMyAdmin on `localhost:8080`
](
http://localhost:8080/
)
You can also access raw sql, e.g.:
```
mysql --host=localhost --port=3306 --password --user=username
```
and load an sql file with
`source [filename]`
.