Closed (cannot reproduce)
Project:
Advanced CSS/JS Aggregation
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Nov 2014 at 08:54 UTC
Updated:
23 Aug 2016 at 23:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mpotter commentedI cannot reproduce this on any system. CTools should definitely already be defined first.
Comment #2
socialnicheguru commentedit happens when advagg module is used and gz compression
Comment #3
socialnicheguru commentedThis problem only happens when advagg is enabled. For some reason ctools is not loaded correctly.
Comment #4
mikeytown2 commentedDoes it happen if defer is disabled?
File in question: http://cgit.drupalcode.org/oa_radix/tree/assets/javascripts/oa-radix-mod...
Gets added via js_alter: http://cgit.drupalcode.org/oa_radix/tree/template.php#n34
Module: https://www.drupal.org/project/oa_radix
Comment #5
woodzie commentedI get the same error when advagg is enabled - Drupal.Ctools is not defined when it's accessed in oa-radix-modal.js.
I don't have either defer or .gz compression enabled.
If the "Move JS to the footer" options in the Modifications tab is set to:
- Disabled: Works
- All but Javascript Libraries: Error
For some reason even though the 'oa-radix-modal.js' group is set to JS_THEME and not JS_LIBRARY, it's getting added to the header, while ctools modal.js ends up aggregated into the footer, causing the undefined error.
The attached patch fixes it for me, and I haven't noticed any side effects yet. Not sure if this is the best way to do it, or it should be done in one of the avgagg hooks instead...
.
Comment #6
socialnicheguru commentedComment #12
socialnicheguru commentedI don't know where to apply the patch? advagg? I think it is in oa_radix
Comment #13
woodzie commentedYes, sorry, the patch was for oa_radix. I realized that this issue is in the advagg project after I submitted it.
Im not sure if it makes sense to move this isssue to oa_radix, or is that considered bad practice?
Comment #14
mikeytown2 commentedThanks for the patch! I'll see if this should be re-worked as an advagg patch once I test this out.
Comment #15
nitin.k commentedI have faced the same problem but in my case I used the following code and got the pop up on page load.
It can help till some extent , hoping so.
Note: Include your JS in the callback where you need to put the below code.
JS code:
********
Callback code:
**************
Note: Please include the required files by using ctools_include function, normally we face this error when some inc and js file is not included in the page.
Cheers !!
Comment #16
mikeytown2 commentedInstalling the theme by it's self and I get a WSOD in regards to variable_get_value() being undefined.
Looks like I need the https://www.drupal.org/project/variable module
Also the panels module
Call to undefined function panels_mini_block_view() in sites/all/themes/oa_radix/template.php on line 112Also https://www.drupal.org/project/oa_core which means I need to get the distribution in order to test this theme.
Comment #17
mikeytown2 commentedOK fresh install of OA with advagg updated to the latest dev. How do I trigger this error; so far the only thing I see is "You must install the Colorbox library."
Comment #18
mikeytown2 commentedComment #19
mikeytown2 commentedAny news?
Comment #20
mikeytown2 commentedRe-open if you have more info