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) »
  • Theme breaks jquery
Pages: [1] 2

Author Topic: Theme breaks jquery  (Read 4339 times)

jeffw

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.3.3
Theme breaks jquery
March 29, 2012, 01:45:49 am
Have seen some similar issues but nothing that seems to address our problem.  Just upgraded from 3.4.5 to 4.1.1 on drupal6.  Started getting the "you need to enable javascript" error on the console.  Our custom theme is based on Marvin, which is Chameleon.  No question that the theme is what's causing the problem because it doesn't happen with garland, & I can see garland loading the jquery modules, which don't appear in the other.  Thing is, there's hardly anything to marvin/chameleon (btw factory chameleon breaks it too, I checked more than once); no javascript, no templates, just a lot of css.  And of course, it worked before the upgrade.  So how do I find what is breaking the jquery?  We need our custom theme back.

Civicrm is the ONLY noncore module enabled, and I don't have anything optimized at all right now.

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: Theme breaks jquery
March 29, 2012, 04:24:50 pm
Quote
Started getting the "you need to enable javascript" error on the console.
You mean on the dashboard ?

If you use firefox, can you check your error console?

Kurund
Found this reply helpful? Support CiviCRM

jeffw

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.3.3
Re: Theme breaks jquery
March 29, 2012, 05:39:15 pm
Yes the dashboard.  The error console just has the standard "ReferenceError: Can't find variable: cj" which of course is because no jquery has been loaded.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Theme breaks jquery
March 29, 2012, 05:42:02 pm
Look in the Net tab of Firebug and see if any files are missing.
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.

jeffw

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.3.3
Re: Theme breaks jquery
March 29, 2012, 06:19:26 pm
Whole bunch of GETs, no errors.  JS-wise we have ckeditor, openflashchart.packed, swfobject.
« Last Edit: March 29, 2012, 06:23:14 pm by jeffw »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Theme breaks jquery
March 30, 2012, 04:32:47 am
I would compare the list of JS files on the page between a working theme and a non-working theme and see if you can see what's missing.
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.

jeffw

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.3.3
Re: Theme breaks jquery
March 30, 2012, 04:11:37 pm
Working theme:

  <script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/jquery.min.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/jquery-ui-1.8.16/js/jquery-ui-1.8.16.custom.min.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.autocomplete.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jstree/jquery.jstree.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.menu.pack.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.chainedSelects.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.contextMenu.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.tableHeader.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.textarearesizer.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.form.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.tokeninput.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.timeentry.pack.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.mousewheel.pack.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.toolTip.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/DataTables-1.7.6/media/js/jquery.dataTables.min.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.dashboard.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.FormNavigate.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.validate.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.civicrm-validate.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery.ui.datepicker.validation.pack.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../packages/jquery/plugins/jquery-fieldselection.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../js/rest.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../js/jquery/jquery.crmaccordions.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../js/jquery/jquery.crmasmselect.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../js/jquery/jquery.crmtooltip.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../js/jquery/jquery.crmrowhighlighter.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../js/Common.js?7"></script>
<script type="text/javascript" src="/contacts/sites/all/modules/civicrm/drupal/../js/noconflict.js?7"></script>
   <script type="text/javascript"
src="https://www.yesfairelections.org/contacts/sites/all/modules/civicrm/packages/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="https://www.yesfairelections.org/contacts/sites/all/modules/civicrm/packages/OpenFlashChart/js/json/openflashchart.packed.js"></script>
<script type="text/javascript" src="https://www.yesfairelections.org/contacts/sites/all/modules/civicrm/packages/OpenFlashChart/js/swfobject.js"></script>

Not working theme:

   <script type="text/javascript"

src="https://www.yesfairelections.org/contacts/sites/all/modules/civicrm/packages/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="https://www.yesfairelections.org/contacts/sites/all/modules/civicrm/packages/OpenFlashChart/js/json/openflashchart.packed.js"></script>
<script type="text/javascript" src="https://www.yesfairelections.org/contacts/sites/all/modules/civicrm/packages/OpenFlashChart/js/swfobject.js"></script>

What does that tell me?  I already know it's not loading a ton of stuff, what I don't know is why.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Theme breaks jquery
March 31, 2012, 11:39:39 am
I'm not sure. Both of these are core, unedited themes?
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.

jeffw

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.3.3
Re: Theme breaks jquery
April 01, 2012, 04:44:39 pm
Yes.  I moved everything out of the custom themes directory that might possibly have been causing conflicts to make sure.

https://yesfairelections.org/contacts/civicrm


Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Theme breaks jquery
April 02, 2012, 03:10:54 am
That URL has no JS whatsoever. It's of course Access denied for me. But even the home page of that site has no JS whatsoever.

Are you sure all of your Drupal files are unedited?
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.

jeffw

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.3.3
Re: Theme breaks jquery
April 02, 2012, 06:48:00 am
It's loading the 3 js files I mentioned earlier, at least if you're signed in.  The drupal is completely untouched, other than the soap api, which shouldn't come into play on this page.

How can a theme cause civicrm not to load jquery?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Theme breaks jquery
April 02, 2012, 11:48:10 am
Quote from: jeffw on April 02, 2012, 06:48:00 am
How can a theme cause civicrm not to load jquery?

Well it generally shouldn't but JS loading is actually a bit complicated in Drupal. The list of files goes into a system array and then eventually that's converted into the correct HTML to print on the page. I don't know about D7 for sure, but there modules and themes in D6 that would sometimes play games with that array (to change certain values) and so if that was not done correctly, yes, you could "lose" some JS files.

But I don't know what the issue is with your site. :(

Can you test with a fresh install and see if it also fails?
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.

jeffw

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.3.3
Re: Theme breaks jquery
April 03, 2012, 11:47:23 pm
If I'm going to do that I figure I may as well upgrade to D7 as well.  However I'm not finding instructions for upgrading drupal to 7 after you've already upgraded civi to 4.1.  Is that just a matter of changing something civicrm.settings.php?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Theme breaks jquery
April 04, 2012, 02:37:51 am
Could be nothing needs to be changed at all actually. I would give it a try and see.
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.

jeffw

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6.20
  • MySQL version: 5.0.77
  • PHP version: 5.3.3
Re: Theme breaks jquery
April 06, 2012, 11:47:36 pm
Ok, well after trying unsuccessfully to upgrade (some db error in the d7 upgrade, which I've actually DONE before, so don't know what that's about), I tried a completely from scratch install of both drupal and civi, to see what would happen.  Answer:

CiviCRM Home
There are a few things to setup before using your site ...
Go
Please enter your organization's name and primary address.
 Organization Name
Go
Please enter a default FROM Email Address (for system-generated emails).
 From Email Address
Go
Please configure a default mailbox for CiviMail. (learn more)
 Default CiviMail Mailbox
Configure Your Dashboard
Refresh Dashboard Data
Javascript must be enabled in your browser in order to use the dashboard features.

And that was with Garland!

So then I tried installing on my mac.  Does exactly the same thing our site does, works with Garland but not with anything else.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Theme breaks jquery

This forum was archived on 2017-11-26.