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) »
  • Accordion sections do not open and close when editing contact
Pages: [1]

Author Topic: Accordion sections do not open and close when editing contact  (Read 1402 times)

ehowland

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: various
  • PHP version: various
Accordion sections do not open and close when editing contact
August 15, 2011, 11:16:28 pm
I was at version 3.2 and something happened so that when I was/am editing a contact the accordion tabs do not open and close by clicking on them.  I am able to open and close them by clicking on the "Expand All Tabs" and "Close All Tabs". 

It seemed like this was probably something javascript related so I decided to upgrade a devel site.  I went from 3.2 to 4.05 and, of course, upgraded to Drupal 7.   So I have a brand new set of Drupal files and a new set of Civi files. There are no other Drupal modules on this devel site except Civi. The upgrade script tells me it has successfully upgraded.  But this behavior remains.

If I look at the demo site page.  I see how the class on the parent div to the has either crm-accordion-open or crm-accordion-closed class when it is open or closed. If I do the same thing to my page manualy using firebug sure enough the section opens up.  Both my pages and the demo site seem to have the same jquery.crmaccordions.js which set these classes.  And not surprising, while I am not real good with the javascript debuggers, it seems the function runs on the demo site but not on my devel site.

But that leaves the question of what in the database (since the files are new) is keeping the jquery.crmaccordions.js from running??


« Last Edit: August 15, 2011, 11:28:20 pm by ehowland »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Accordion sections do not open and close when editing contact
August 16, 2011, 07:05:18 am
You can use FireBug for Firefox to look for JS errors and (via the Net tab) to look for missing files.

Aside from that, be sure to flush all caches and also be sure you removed all files and directories from sites/default/files/civicrm/templates_c
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.

ehowland

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: various
  • PHP version: various
Re: Accordion sections do not open and close when editing contact
August 23, 2011, 09:21:52 am
This seems to be related to ckeditor.  I get the following message from the firebug console:

CKEDITOR is not defined
  if ( CKEDITOR.instances['email_1_signature_html'] ) {                        http://localhost/civicrm/contact/add?reset=1&action=update&cid=4938 Line 845

This is in this code:

</div><!-- /.crm-accordion-header -->
<div id="signatureBlock1" class="crm-accordion-body">
<label for="email_1_signature_html">Signature (HTML)</label><br /><textarea rows="2" cols="40" name="email[1][signature_html]" id="email_1_signature_html" class="form-CKeditor"></textarea><script type='text/javascript'>
cj( function( ) {
cj('#email_1_signature_html').removeClass();
if ( CKEDITOR.instances['email_1_signature_html'] ) {
CKEDITOR.remove(CKEDITOR.instances['email_1_signature_html']);
}
if ( cj('#email_1_signature_html').val( ) == '' ) cj('#email_1_signature_html').val('&nbsp;');
CKEDITOR.replace( 'email_1_signature_html' );
var editor = CKEDITOR.instances['email_1_signature_html'];
if ( editor ) {
editor.on( 'key', function( evt ){
global_formNavigate = false;
} );


If I switch to the TinyMCE editor in Global Settings -> Site Preferences the accordion headers work fine.

I checked the files and there is a copy of ckeditor in sites/all/modules/civicrm/packages
/ckeditor. I also installed the Drupal ckeditor but that did not change anything.

Since this is a fresh install of CiviCRM 4.05 the files are probably OK.  Interestingly there is no templates_c at sites/default/files/civicrm/templates_c

The permissions are set for the creation of such a directory and I do have custom, persist, and upload in the files/civicrm directory.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Accordion sections do not open and close when editing contact
August 23, 2011, 10:07:45 am
Put back CKeditor and look in the NET tab of Firebug and see if any JS files are not found.
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.

ehowland

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: various
  • PHP version: various
Re: Accordion sections do not open and close when editing contact
August 23, 2011, 12:28:48 pm
No files not found, but  ckeditor.js is aborted.  I replaced ckeditor.js file from another site and then downloaded a fresh civicrm version of 4.0.5 and replaced the ckeditor directory in the packages directory and then the whole civicrm directory.  So it seems it must be some sort of configuration issue rather than a corrupted file.  Other js is being loaded from a different package (jquery).

Always before the templates_c folder appeared automatically.  Is it's absence a clue?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Accordion sections do not open and close when editing contact
August 23, 2011, 01:14:31 pm
It's absence is a sign of a problem. If it was now created, that's good.

If all files are found and loaded correctly, then I'm not sure what the problem is, without seeing the site. You could try of course disabling other add-on modules you may have and see if that helps.
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]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Accordion sections do not open and close when editing contact

This forum was archived on 2017-11-26.