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 »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Ajax post fails editing contact if Drupal JavaScript aggregation is enabled
Pages: [1]

Author Topic: Ajax post fails editing contact if Drupal JavaScript aggregation is enabled  (Read 569 times)

bsilvern

  • I’m new here
  • *
  • Posts: 14
  • Karma: 2
  • CiviCRM version: 4.6
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.37-0+wheezy1
  • PHP version: 5.4.4-14+deb7u10
Ajax post fails editing contact if Drupal JavaScript aggregation is enabled
November 14, 2014, 06:35:58 pm
This might be a bug in CiviCRM or in the Drupal Advanced CSS/JS Aggregation module, but I'll present it here and see if anyone has any thoughts.

When JavaScript aggregation is enabled in the Drupal Advanced CSS/JS Aggregation module, in-place editing of contact fields fails with:
"Sorry but we are not able to provide this at the moment.
Invalid className:"

The error occurs at the first line of CRM_Core_Page_AJAX::run() (CRM/Core/Page/Ajax.php line 48) as it is called with $_REQUEST['class_name'] unset.

On the browser side, I have not traced down the exact cause of that HTTP Post failing to define the class_name, but I have observed that upon loading the page for a contact, the error
"$.fn.select2 is undefined"
occurs at civicrm/ajax/l10n-js/en_US line 21 ($.fn.select2.defaults.formatNoMatches = "None found."; ). I assume this is what ultimately causes the class_name to be undefined in the subsequent Ajax Post.

Both errors occur only if JavaScript aggregation is enabled.

Editing works as expected when using the contact Edit screen.

The problem was first noticed immediately after upgrading from Civi 4.5.0 to 4.5.3.

Drupal: 7.32
Drupal Advanced CSS/JS Aggregation module: 7.x-2.7
CiviCRM: 4.5.3

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Ajax post fails editing contact if Drupal JavaScript aggregation is enabled

This forum was archived on 2017-11-26.