Skip to content

How do I find the error behind a problem?

Every error KahunaCart hits ends up in logs/grav.log, in the root of your Grav site. Webhook, download and job failures all land there, and KahunaCart's own lines start with kahunacart.

Read the log

Show the last 50 KahunaCart lines:

BASH
grep kahunacart logs/grav.log | tail -50

Or show the end of the whole log:

BASH
bin/grav logviewer --lines=50

Look for lines around the time the problem happened.

See the full error on a development copy

On a development copy, turn on error display in user/config/system.yaml. Grav then shows the full error and stack trace in the browser instead of a generic error page:

YAML
errors:
  display: 1
  log: true

Warning

Turn error display off again before the site is public. A stack trace on a live storefront tells strangers far too much about your server.

Find out why a page is slow

Grav's debugger (debugger.enabled: true in the same file) adds a toolbar with every query, every template and how long each took. Route caching is skipped while it is on, so a caching problem can vanish in development and come back in production.

Errors in the browser

For something that only breaks in the browser, such as a button that does nothing or a cart that does not update, open the developer tools and look at the Console and Network tabs. A red line there, with its status code, is often the whole answer.

Was this helpful?

More in Troubleshooting

See all in Troubleshooting