Closed (fixed)
Project:
Bootstrap
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2015 at 05:04 UTC
Updated:
12 Aug 2015 at 15:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
waverate commentedMark,
This looks good for Bootstrap:
http://maxcdn.bootstrapcdn.com/data/bootstrapcdn.json
Comment #2
markhalliwellThat's just for Bootstrap. In the GH issue I linked, I learned that file is automatically generated from http://api.jsdelivr.com/v1/bootstrap/libraries. Considering that this JSON data has both Bootstrap and Bootswatch, I think it'd be better to use that one directly.
Comment #3
markhalliwellInitial WIP (non-working) patch of dynamic CDN
Comment #4
markhalliwellSigh... it didn't add the new file... trying again...
Comment #5
markhalliwellComment #6
waverate commentedMark,
Against latest 7.x-3.x-dev, I get a WSOD on the settings page. From log:
Notice: Use of undefined constant BOOTSTRAP_MAJOR_VERSION - assumed 'BOOTSTRAP_MAJOR_VERSION' in _bootstrap_cdn_api() (line 113 of sites/all/themes/bootstrap/includes/cdn.inc).Using php 5.4.38
Comment #7
Christopher Riley commentedI ran into the same issue. It appears that it is not reading the define out of template.php. I added the same define to the top of includes/cdn.php and it works and does not give a already defined message. I added a line to the top of template.php saying it was loaded and another at the top of cdn.php and I see the message about cdn.php but not template.php.
How does the loading order work with a subtheme? Could this be a subtheme related issue? For the time being I moved the define over to cdn.php and all is working but would love to see this cleaned up and implemented.
Thanks in advance.
Comment #8
markhalliwellI would have thought this was pretty self-explanatory...
Comment #9
markhalliwellFinal patch
Comment #10
markhalliwellOk. I think this is "done" and ready for review/testing.
@neardark, please advise. Doesn't have to be ported to 8.x just yet. Just need as many eyes as possible on this.
Comment #11
markhalliwellComment #12
neardark commentedOnly two minor minor items noted below. I need to re-review when my mind is clear, but this looks great. I did install, and it worked well.
it's should be its
%21 should be a forward slash I believe.
Comment #13
waverate commentedPatch #9 with #12 changes works.
Comment #15
markhalliwellOk, I addressed #12.1. #12.2 is correct, API doesn't recognize a forward slash there.
Moving this to 8.x-3.x for port and more review. If there's any further issues found with this work, please open a new issue to address.
I'll be creating a change record for this issue.
Comment #16
markhalliwellPublished change record: https://www.drupal.org/node/2452617
Comment #20
neardark commentedComment #22
neardark commentedComment #24
polHi all,
I made a Libraries API integration module with CDN, you can find it here: https://www.drupal.org/project/libraries_cdn
It might certainly help you managing your CDN in a easy way.