Paths to local css & js include a /dist/ directory.

Comments

kay_v created an issue. See original summary.

kay_v’s picture

StatusFileSize
new912 bytes

patch attached

mfrosch’s picture

Had the same issue - patch worked for me - please apply or check for "dist" if files are does not exist.
Thanks

frob’s picture

I think this is avoiding the larger problem with this module. There are two download links on the getbootstrap download page.

Source
https://github.com/twbs/bootstrap/archive/v4.1.0.zip

Dist
https://github.com/twbs/bootstrap/releases/download/v4.1.0/bootstrap-4.1...

The official composer package downloads the source version. However, depending on your sites configuration that could put the library in a directory that is inaccessible to the browser.

Proposed Solution:

Change the options for selecting what version to use from dev/production (minified/non-minified) to source/dist. At the very least we should have documentation telling people to only download the dist version from getbootstrap.

For anyone finding this on google. To make this work with composer and not have to patch the module put this into your composer.json under repositories:

,
        {
            "type": "package",
            "package": {
                "name": "twbs/bootstrap",
                "version": "v4.1.0",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/twbs/bootstrap/releases/download/v4.1.0/bootstrap-4.1.0-dist.zip",
                    "type": "zip"
                }
            }
        }
frob’s picture

StatusFileSize
new2.78 KB

Here is a patch that adds the composer source version as an option on the dropdown. It isn't a great solution, but it is a non-destructive/backwards-compatible solution.

hatuhay’s picture

Status: Active » Closed (won't fix)
hatuhay’s picture

Status: Closed (won't fix) » Fixed
frob’s picture

@hatuhay, I am confused. How is this fixed?

hatuhay’s picture

A composer.json file was added and the local composer location either

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

efpapado’s picture

A composer.json file was added and the local composer location either

I don't understand this. Could you be more specific?

justinmello32’s picture

I'm a little confused on the composer.json addition but I know the patch was able to help.

Just needed to point to bootstrap/dist/css/ and bootstrap/dist/js/ instead of just bootstrap/css and bootstrap/js

Thanks for the help on this, library is now working locally! :)

drupalfan2’s picture

How will this be solved in next release version 8.x-1.12?

There is no reason why we should not be able to download the source files version of bootstrap 4. Then a subfolder /dist/ is needed.

Of course the compiled version could also be downloaded, then no subfolder /dist/ is needed to work.

ressa’s picture

What is the status here? It seems unresolved ...

frob’s picture

Looks like my patch from #4 was committed which added a new option for the dropdown. I don't know if there is still an issue here or if another solution needs to be made, but I suggest opening a new issue and linking here if anyone has further questions.