Bedrock Theme issue

Hi everyone.

I am having issues developing a new Bedrock theme. I have followed the tutorial here

But it doesn’t work. Everything compiles completely fine but I get the error Uncaught ReferenceError: bootstrap is not defined in the javascript console when I load my site.

Is there something I am doing wrong? I have looked at the source code repository for the tutorial and everything matches to what I have done it just will not work.

Bootstrap v5.3.3 is shown in the node_modules of my project along with @concretecms/bedrock version 1.6.2.

Node version is 22.18.0 and NPM is version 10.9.3. I am running everything on MacOS Sequoia on Apple Silicon.

I am at a complete loss as to why I am getting this error. I have tried deleting the project directory and restarting but it just results in the same error.

I have even tried cloning the Flintstone repository and installing that and it produces the exact same error message. Again, everything compiles fine, I install the theme then return to the web site. Completely white page with the console showing the error Uncaught ReferenceError: bootstrap is not defined.

I would appreciate any help with resolving this very frustrating issue. Thank you.

Do you have this in you page_theme.php

public function getThemeSupportedFeatures()
    {
        return [
            Features::BASICS,
            Features::TYPOGRAPHY,
            Features::IMAGERY,
        ];
    }

No as the tutorial doesn’t list those. Are they required?

Also, thank you for your reply and I’ll try adding them.

Tried adding those and still no joy. Still get the Uncaught ReferenceError: bootstrap is not defined.

I have tried uninstalling the theme and re-installing it. Same error. The version of ConcreteCMS I have is as follows:

Concrete Version

Core Version - 9.4.3
Version Installed - 9.4.3
Database Version - 20250227155410

Really appreciate your help.

And you definitely have

import ‘@concretecms/bedrock/assets/bedrock/js/frontend’;.

Amd

@concretecms/bedrock/assets/bedrock/scss/frontend”;.

In your SCSS?

Can you see bootstrap css in the files when compiled?

Yes I have both of those lines in the JS and SCSS files.

Bootstrap CSS is included in the compiled main.css file.

It just doesn’t work in ConcreteCMS. I’m wondering if its the way I’ve installed ConcreteCMS. I installed it by downloading and extracting the ZIP file from the web site and haven’t done it via the composer method. Could that be the issue as I have noticed when I added a topic tree when I cancelled it to begin with I got a page not found and am wondering if there is an issue with the ZIP file.

Think I’ll give that a try and see what happens.

Bollocks. That didn’t work either.

Still receiving the error that bootstrap is not defined.

I really dont know how to proceed with this. I may just have to abandon Bedrock as I have a lot to do and not a lot of time to do it in.

Am I the only one experiencing this issue?

Hooray! Found the issue!

I was missing

<?php View::element('footer_required'); ?>

from above the javascript include in the elements/footer.php file. I officially feel a complete moron. I’m off to lie down in a dark room.

Thank you @TMDesigns for all your suggestions and help.

1 Like