CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • 4.3 CSS and JavaScript missing intermittedly
Pages: [1] 2 3

Author Topic: 4.3 CSS and JavaScript missing intermittedly  (Read 4866 times)

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
4.3 CSS and JavaScript missing intermittedly
May 08, 2013, 09:04:23 am
Since upgrading to 4.3 we are experiencing significant problems with JavaScript and CSS. It appears that several pieces are not loading consistently. If I flush all caches the problem goes away for a few minutes, but then returns.

I have disabled CSS and JavaScript caching, and upgraded to 4.3.2.

When the problems occurs, the following bits of code are missing:

Code: [Select]
<script type="text/javascript">
var CRM = {"config":{"userFramework":"Drupal","resourceBase":"\/sites\/all\/modules\/civicrm\/"}};
</script>
<meta property="og:site_name" content="BikeWalkKC" />

@import url("https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/css/jquery.autocomplete.css?mmhju9");
@import url("https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/css/menu.css?mmhju9");
@import url("https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/css/token-input-facebook.css?mmhju9");
@import url("https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/jquery-ui-1.9.0/css/smoothness/jquery-ui-1.9.0.custom.min.css?mmhju9");
@import url("https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/DataTables/media/css/demo_table_jui.css?mmhju9");
@import url("https://bikewalkkc.org/sites/all/modules/civicrm/css/civicrm.css?mmhju9");
@import url("https://bikewalkkc.org/sites/all/modules/civicrm/css/extras.css?mmhju9");

<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/jquery-1.8.3.min.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/jquery-ui-1.9.0/js/jquery-ui-1.9.0.custom.min.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.autocomplete.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.menu.pack.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.chainedSelects.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.tableHeader.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.textarearesizer.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.form.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.tokeninput.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.timeentry.pack.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.mousewheel.pack.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/DataTables/media/js/jquery.dataTables.min.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.FormNavigate.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.validate.min.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.ui.datepicker.validation.pack.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.jeditable.mini.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.blockUI.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.notify.min.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/packages/jquery/plugins/jquery.redirect.min.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/js/rest.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/js/Common.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/js/jquery/jquery.crmeditable.js?mmhju9"></script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/js/jquery/jquery.crmasmselect.js?mmhju9"></script>
<script>CRM.url('init', '/civicrm/example?placeholder');</script>
<script src="https://bikewalkkc.org/sites/all/modules/civicrm/js/noconflict.js?mmhju9"></script>


Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: 4.3 CSS and JavaScript missing intermittedly
May 08, 2013, 10:23:39 am
Quote
Since upgrading to 4.3 we are experiencing significant problems with JavaScript and CSS. It appears that several pieces are not loading consistently.

Do you mean javascript and css are broken?

You should also clear your files/civicrm/templates_c directory ..

HTH
Kurund
Found this reply helpful? Support CiviCRM

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Re: 4.3 CSS and JavaScript missing intermittedly
May 08, 2013, 10:42:25 am
yes, they are broken. And yes, I have cleared templates_c

Quote from: Kurund Jalmi on May 08, 2013, 10:23:39 am
Quote
Since upgrading to 4.3 we are experiencing significant problems with JavaScript and CSS. It appears that several pieces are not loading consistently.

Do you mean javascript and css are broken?

You should also clear your files/civicrm/templates_c directory ..

HTH
Kurund

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: 4.3 CSS and JavaScript missing intermittedly
May 08, 2013, 10:46:40 am
Can you check your browser's error console and let us know if you see any errors. Can you also check if you get same behavior with default theme like garland just to make sure there is no theme conflict.

Kurund
Found this reply helpful? Support CiviCRM

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Re: 4.3 CSS and JavaScript missing intermittedly
May 08, 2013, 11:00:07 am
Quote from: Kurund Jalmi on May 08, 2013, 10:46:40 am
Can you check your browser's error console and let us know if you see any errors. Can you also check if you get same behavior with default theme like garland just to make sure there is no theme conflict.

Kurund

Nope, no console errors. And it happens both Garland and Stark as well.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: 4.3 CSS and JavaScript missing intermittedly
May 08, 2013, 11:13:47 am
Hmm strange.. How about clearing browser cache? Can you attach some screenshots? Also make sure your resource url is correct. Can you see images in navigation etc?

Kurund
Found this reply helpful? Support CiviCRM

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: 4.3 CSS and JavaScript missing intermittedly
May 08, 2013, 11:20:57 am
AFAIK you are the first to report this problem of hundreds of sites running 4.3, so it would be good to do some debugging on your end and see what's up.
As Kurund said, check your resource url settings in the civi admin section. Also check to see if the problem is happening for all users and not just some users.
Another distinction to make is: is the markup missing completely or is it pointing to the wrong url?
From your first post it looks like the markup is missing completely, however I notice in your code snippet that not all of it is Civi's css and js, but some of it belongs to drupal. So if that's true then there seems to be something going on with your drupal install.
Try asking your question on the new CiviCRM help site.

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Re: 4.3 CSS and JavaScript missing intermittedly
May 08, 2013, 12:20:42 pm
I am on the latest version of Drupal 7.

Resource URLS appear to be correct: http://cl.ly/image/1t2T0h303o3o

Here are some screenshots:

http://cl.ly/image/303K38412q0n

http://cl.ly/image/001I0q3j0M2K

http://cl.ly/image/1c3C20351w1E

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: 4.3 CSS and JavaScript missing intermittedly
May 08, 2013, 10:19:15 pm
Could you add some bit of code inside CRM/Core/Resources.php function addCoreResources - a devel dpr statement or better yet a snippet that logs something to a file. It would be nice to know if that function is being run or not.
Try asking your question on the new CiviCRM help site.

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Re: 4.3 CSS and JavaScript missing intermittedly
May 09, 2013, 04:24:00 am
I am not a CiviCRM developer, but I could add something with assistance.

Quote from: Coleman Watts on May 08, 2013, 10:19:15 pm
Could you add some bit of code inside CRM/Core/Resources.php function addCoreResources - a devel dpr statement or better yet a snippet that logs something to a file. It would be nice to know if that function is being run or not.

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Re: 4.3 CSS and JavaScript missing intermittedly
May 09, 2013, 04:52:01 am
I also notice this JavaScript error when the problem is happening. It occurs anywhere from 3 to 15 times, depending on the page viewed.

Error: ReferenceError: cj is not defined
Source File: https://bikewalkkc.org/civicrm/report/instance/11?reset=1
Line: 169

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Re: 4.3 CSS and JavaScript missing intermittedly
May 11, 2013, 09:06:43 am
Just upgraded to 4.3.3. and still having problems. I noticed that when the problem occurs this line of code is present:
<script src="https://my-path/misc/jquery.js?v=1.4.4"></script>

When the page loads correctly, this line is absent.

Where is it getting called?

I have also tried disabling Superfish, Nice Menus, and Jquery Update Drupal modules, but those don't seem to have any impact on the problem.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: 4.3 CSS and JavaScript missing intermittedly
May 11, 2013, 09:13:17 am
That line is called by Drupal. It should happen on every page load. So I wouldn't consider having that line absent "loading correctly."
Try asking your question on the new CiviCRM help site.

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Re: 4.3 CSS and JavaScript missing intermittedly
May 11, 2013, 09:14:55 am
Thanks.  The problem is that when it loads correctly in Drupal, it is breaking CiviCRM.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: 4.3 CSS and JavaScript missing intermittedly
May 16, 2013, 04:48:24 am
I looked at this site. The Resource URLs and Directories are correct. The Drupal DB does need some updates to be run, but I don't think that is the issue here.

I also saw that the JS intermittently does work, and then fails again on a different page. The issue, when it fails, is a JS conflict, that's clear (it's not a CSS problem).

I see this site has "Context   7.x-3.0-beta6" which "Provide modules with a cache that lasts for a single page request." This may be the issue. I'm not positive, however.

When it fails, the error is "cj is not defined", as noted.

This site has a lot of modules--I looked for a caching tool as I thought perhaps that's the issue. The only one I see however is Context.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1] 2 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • 4.3 CSS and JavaScript missing intermittedly

This forum was archived on 2017-11-26.