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 CiviEvent (Moderator: Yashodha Chaku) »
  • [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
Pages: [1] 2

Author Topic: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"  (Read 7989 times)

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
[WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 11, 2014, 04:27:21 am
Hello,

I'm facing 3 issues with the "Add event registration" windows when trying to register or edit a registration for a contact :

  • Blocker :Event_ID is displayed, instead of the event names dropdown list
  • Major : Fees related to the event are not anymore displayed
  • Trivial : New "partially paid" French translation contains a "é" caracter not well displayed : é

See attached

Bugzilla is reporting 2 issues :

- when loading the page : TypeError: $(...).attr(...) is undefined  : "var oldClass = $(tab).attr('class').match(/(crm-count-\d+)/);" [http://domain/]gdc/wp-content/plugins/civicrm/civicrm/templates/CRM/common/TabHeader.js?r=czDTh  - line 100, column 8

- when clicking on "Add event registration" a syntax error : "var pendingInCartStatusId = ;" with a file stored here [http://domain/]gdc/wp-content/plugins/civicrm/civicrm/packages/jquery/jquery-1.11.1.js?r=czDTh" - line 9 column 38

I can access both files directly from the navigation bar.

These bugs were already there with 4.5 and 4.5.1 did not fix them.
Could you please advise ?

Thanks
« Last Edit: October 11, 2014, 04:38:46 am by SemperFi »

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 11, 2014, 06:40:47 am
Do you have any custom code in place on this site?
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 11, 2014, 07:10:15 am
Hey Dan, no no custom code.
I've an exact copy on another PC for test purpose and there is no such issues.

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 11, 2014, 07:40:33 am
Ok, so the PC version is an exact copy of the site correct?  All the same Wordpress plugins, etc.  And are both Windows environments?  And all of the Resource directories and urls are appropriate for the environment that isn't working (one didn't accidentally get left set to the working PCs directory/url structure)?

I'm trying to rule out possible variables since it appears that the problem is most likely environment related.
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 11, 2014, 11:41:42 pm
Yes. Everything is aligned on both environment.
Any idea ?

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 12, 2014, 05:28:46 am
Unfortunately I am stumped at the moment, I can't think of a reason why it would work on one place and not another if both environments are the same.  I will try to think about it some more though and see if I come up with something.
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 12, 2014, 11:40:55 pm
Same issue can be seen when using "Register new participant" from "Event" menu :

SyntaxError: syntax error => "var pendingInCartStatusId = ; "
[http://domain/]gdc/wp-admin/admin.php?page=CiviCRM&q=civicrm/participant/add&reset=1&action=add&context=standalone
Line 512, column 38

The "Fee" section is not displayed when registering new participant, but the event names dropdown is displayed.

Can anyone help ?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 13, 2014, 01:23:35 am
Are you using the event cart? I'm not sure it is really supported
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 13, 2014, 02:07:07 am
Hello Eileen - No we're not using the event cart, the option "Use Cart Checkout workflow", in Administer -> CiviEvent -> CiviEvent Component Settings, is not activated.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 13, 2014, 07:57:23 am
So, what you are describing and displaying in your screenshot is a general javascript crash. There are more things wrong in your screenshot (missing dialog title, buttons in wrong place) but they all have the same cause - some script on the page has crashed javascript.

You need to open up your browser's console and look for the error message that would appear to tell you why it crashed.

Another random thing to try - see if switching your site to English makes any difference (as a temporary experiment to see if the bug is related to an unescaped translated string).
Try asking your question on the new CiviCRM help site.

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 13, 2014, 09:24:26 am
Thanks Coleman for guidance:

I tried with FX and IE, both are getting same code error :

When displaying events list : TypeError: $(...).attr(...) is undefined TabHeader.js:100

When opening a registration window :
  • either from contact profile :

IE : SyntaxError: syntax error  - Fichier : jquery-1.11.1.js, ligne : 338

FX : SyntaxError: syntax error  - Fichier : jquery-1.11.1.js, ligne : 9
+
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/ file :  jquery-1.11.1.js:9592
[/list]
Code: [Select]
// Open the socket
xhr.open( options.type, options.url, options.async, options.username, options.password );
  • or from "Register event participant" (event menu) IE & FX:

admin.php - line 512(FX) - 510(IE) :
Code: [Select]
      CRM.$(function($) {

        var $form = $('form.CRM_Event_Form_Participant');

        // don't show cart related statuses if it's disabled
   
          var pendingInCartStatusId = ;
          $("#status_id option[value='" + pendingInCartStatusId + "']").remove();
       
          var pendingRefundStatusId = 18;
          $("#status_id option[value='" + pendingRefundStatusId + "']").remove();


Changing from FR to EN did not make any change.

Any idea ?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 13, 2014, 10:22:37 am
Yes, I see it now: this is a fatal syntax error:
Quote
var pendingInCartStatusId = ;
Caused by sloppy use of smarty/js. I'll file an issue and fix for 4.5.2
Try asking your question on the new CiviCRM help site.

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 13, 2014, 10:33:24 am
I knew you'll catch it ! Great - when do you think I'll be able to manually apply the patch (until 4.5.2 is released) ?
This is impacting our production site, and quite blocking for incoming events.

Thanks very much Coleman !

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 13, 2014, 11:04:49 am
I think there's a better fix than this, but here's a very quick patch to get you back on your feet:
Code: [Select]
diff --git a/templates/CRM/Event/Form/Participant.tpl b/templates/CRM/Event/Form/Participant.tpl
index 158cf90..3157783 100644
--- a/templates/CRM/Event/Form/Participant.tpl
+++ b/templates/CRM/Event/Form/Participant.tpl
@@ -341,7 +341,7 @@
         var $form = $('form.{/literal}{$form.formClass}{literal}');
 
         // don't show cart related statuses if it's disabled
-        {/literal}{if !$enableCart}{literal}
+        {/literal}{if !$enableCart && $pendingInCartStatusId}{literal}
           var pendingInCartStatusId = {/literal}{$pendingInCartStatusId}{literal};
           $("#status_id option[value='" + pendingInCartStatusId + "']").remove();
         {/literal}{/if}{literal}
Try asking your question on the new CiviCRM help site.

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: [WP] Civi 4.5.1 - Multiples issues with "Add event registration"
October 13, 2014, 12:03:46 pm
Thank you Coleman, it works better with the patch, I can now edit, add a registration with event name dropdown and fees from contact profile and event menu !

Firebug is still reporting an issue when displaying events list in the "Events" tab of contact profile page

Quote
TypeError: $(...).attr(...) is undefined TabHeader.js:100
var oldClass = $(tab).attr('class').match(/(crm-count-\d+)/);

Code: [Select]
/**
   * Update the counter in a tab
   * @param tab jQuery selector
   * @param count number
   */
  CRM.tabHeader.updateCount = function(tab, count) {
    var oldClass = $(tab).attr('class').match(/(crm-count-\d+)/);
    if (oldClass) {
      $(tab).removeClass(oldClass[0]);
    }
    $(tab)
      .addClass('crm-count-' + count)
      .find('a em').html('' + count);
  };

I can't see what it impacts, but as Firebug is reporting it, might be worthful to look at it.

THANKS AGAIN FOR YOUR HELP Coleman.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • [WP] Civi 4.5.1 - Multiples issues with "Add event registration"

This forum was archived on 2017-11-26.