0

My Craft CMS version 3 site is breaking when I boostrap a custom module up on app.php file.

The code looks like this:


<?php

use craft\helpers\App;

return [
    'id' => App::env('APP_ID') ?: 'CraftCMS',
    'modules' => [
        'my-module' => \modules\Module::class,
        'fa-forms' => \faforms\Module::class
    ],
    'aliases' => [
        '@subdomain' => 'http://subdomain.localhost',
    ], 
    //'bootstrap' => ['fa-forms'],
    //'bootstrap' => ['my-module'],
    'components' => [
        'queue' => [
            'ttr' => 3600,
        ],
    ],
];

If I uncomment the bootstrap for the fa-forms module I get a server error that I cannot trace because it prevents the debug toolbar from loading.

Has anyone had a similar issue with bootstrap breaking their site?

1 Answer 1

1

Without knowing what the actual error is, it's hard to help you out. Could you try and find the error in the error log, probably located at storage/logs/web.log? Error and stack trace should be in there.

Another thing you could do is open a terminal, go to the root folder of your Craft installation and run tail -f storage/logs/web.log. This will show additions to the log as they occur. After that, reload the page that throws the error and see what error appears in your terminal window.

1
  • Thanks Paul - that is some very useful information, I really appreciate it!
    – Sean G
    Commented Jun 9, 2023 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.