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)

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, 02:09:44 pm
Could you please edit that file (templates/CRM/common/TabHeader.js) and add
Code: [Select]
CRM.console('log', 'tab: ', tab);to the top of the function (as the first line, just above "var oldClass = ...") and then run the page again - report back here what your browser console says.
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:43:23 pm
I've 2 new errors (without impact on how things are displayed) :

Quote
ReferenceError: tab is not defined
CRM.console('log', 'tab: ', tab);
TabHeader.js, line :100

TypeError: CRM.tabHeader.updateCount is not a function
CRM.tabHeader.updateCount(ui.tab, data.tabCount);
TabHeader.js, line :42
« Last Edit: October 13, 2014, 10:51:49 pm by SemperFi »

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 14, 2014, 10:34:53 am
At this point a console backtrace would be most helpful. If you enable your "script" tab, then go back to the console, run the page again, and the error message should contain an "expand" button to show the full backtrace.
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 14, 2014, 12:58:12 pm
Is that what you were expecting Coleman ?

ReferenceError: tab is not defined
TabHeader.js, Line 94
Code: [Select]
/**
   * Update the counter in a tab
   * @param tab jQuery selector
   * @param count number
   */
 
  [color=orange][b]CRM.console('log', 'tab: ', tab);[/b][/color]
 
  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);
  };
Line 110


TypeError: CRM.tabHeader.updateCount is not a function
TabHeader.js, Line 37
Code: [Select]
        ui.panel
          .off('.tabInfo')
          .on('crmLoad.tabInfo crmFormSuccess.tabInfo', function(e, data) {
            if (data) {
              if (typeof(data.tabCount) !== 'undefined') {
                [color=orange][b]CRM.tabHeader.updateCount(ui.tab, data.tabCount);[/b][/color]
              }
              if (typeof(data.tabValid) !== 'undefined') {
                var method = data.tabValid ? 'removeClass' : 'addClass';
                ui.tab[method]('disabled');
              }
            }
          });
Line 49

TypeError: CRM.tabHeader.updateCount is not a function
Summary.js Line 96
Code: [Select]
      // Update changelog tab and contact footer
      if (response.changeLog && response.changeLog.count) {
        [b][color=orange]CRM.tabHeader.updateCount('#tab_log', response.changeLog.count);[/color][/b]
      }
Line 49
« Last Edit: October 14, 2014, 02:45:42 pm by SemperFi »

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 14, 2014, 02:44:51 pm
I think I figured out the issue:
https://issues.civicrm.org/jira/browse/CRM-15456
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 14, 2014, 02:48:49 pm
Exact we don't use Membership and Contribution
I added an other error due to the same issue in Summary.js Line 96, see my previous post.
I'll test the proposed fixes and let you know
Thanks Coleman

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 14, 2014, 03:03:36 pm
When I apply the fix it says :
Quote
SyntaxError: missing ; before statement

(last line of TabHeader.js)

Code: [Select]
CRM.tabHeader.resetTab = function(tab) {
    var $panel = CRM.tabHeader.getTabPanel(tab);
    if ($(tab).hasClass('ui-tabs-active')) {
      $panel.crmSnippet('refresh');
    }
    else if ($panel.data("civiCrmSnippet")) {
$panel.crmSnippet('destroy');
    }
   };
 })(CRM.$);

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 14, 2014, 03:15:40 pm
Is it possible the patch did not apply cleanly? My IDE and browser are not seeing any syntax errors, and I just linted with jshint.com and couldn't find any errors there either.
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 14, 2014, 04:04:11 pm
You're right, all issue fixed now ! Thanks Coleman

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 16, 2014, 01:25:21 am
Quote from: Coleman Watts on 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}

Hello Coleman,
Has it been included in the 4.5.2 release or should I manually change it ?
Thanks

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 16, 2014, 11:19:32 am
No I'll try to get it into 4.5.3.
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 16, 2014, 11:40:04 am
Thanks for following the topic Coleman.  8)

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.