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) »
  • Javascript error in "Pay later" checkbox looks for non-existent DOM id.
Pages: [1]

Author Topic: Javascript error in "Pay later" checkbox looks for non-existent DOM id.  (Read 5081 times)

dbabbage

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Javascript error in "Pay later" checkbox looks for non-existent DOM id.
April 15, 2009, 08:43:48 am
Trying to set up my first CiviEvent with online registration. I have an event that appeared to be set up correctly but now when I try to click through to the register page it displays the error: "Request to show() function failed. Element id undefined = payment_information"

I've moved this from a development server to a live server. I've followed the instructions for how to do this and it seems otherwise to have worked well. However, that could somehow be a part of the problem.

Anyone got any leads on what could be going on here, or how I could investigate it further?

Edit: updated title to be more accurate as per #3.
« Last Edit: April 16, 2009, 01:48:58 am by dbabbage »

dbabbage

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Re: Request to show() function failed. Element id undefined = payment_informatio
April 15, 2009, 08:46:57 am
Ahh... it seems to be related to the "enable pay later" option. And trying to tick this results in the apparently related error message:
"Request to hide() function failed. Element id undefined = payment_information"

dbabbage

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Re: Javascript error
April 16, 2009, 01:48:04 am
OK, this is a javascript error attached to the "I prefer to pay later" checkbox. It attempts to hide the payment information if you check the box, but is looking for a DOM element with an id of payment_information which at least the way I have the form set up does not exist. Trying to locate where this needs to be corrected... guess I'll be uploading my first patch to CiviCRM soon. :)

Being a Drupal person, not even sure where one does such things round here... guess I'll figure it out but any advice appreciated.

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Javascript error in "Pay later" checkbox looks for non-existent DOM id.
April 16, 2009, 02:13:15 am
hi
I assume you are running current stable release ( CiviCRM v2.2.2 )

main registration form is : CRM/Event/Form/Registration/Register.php
you might want to check code from line around 219 to 246

template is :  templates/CRM/Event/Form/Registration/Register.tpl
you might want to check code from line around 147 to 157


hope this help

kiran
You Are Designed To Choose... Defined By Choice.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Javascript error
April 16, 2009, 12:09:41 pm
Quote from: dbabbage on April 16, 2009, 01:48:04 am
OK, this is a javascript error attached to the "I prefer to pay later" checkbox. It attempts to hide the payment information if you check the box, but is looking for a DOM element with an id of payment_information which at least the way I have the form set up does not exist.

I suspect this may be a bug related to the specific payment processor you've got configured / selected for this event. I tried to replicate with PayPal Pro and PayPal Std and the pay later checkbox jscript works properly. For PP Pro, there is a payment_information div - and it is hidden onclick. For PP Std - the onclick jscript is not included in the checkbox markup.

Please post back info on the version of CiviCRM you're using (also update your forum profile) - and specifics on the payment processor and event configuration. If the page is public - you could also post a link here.
Protect your investment in CiviCRM by  becoming a Member!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Javascript error in "Pay later" checkbox looks for non-existent DOM id.
April 16, 2009, 01:10:04 pm
hmm - the processor he is using is Paymex - which is posted on their site. If the processor table held the wrong processor type value (i.e form rather than notify) it could happen maybe. I haven't looked at the code but I do have it as they appear to be the cheapest in NZ
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

Sunil

  • I post frequently
  • ***
  • Posts: 131
  • Karma: 23
  • The community around a product more important than the product itself?
    • CiviCRM
Re: Javascript error in "Pay later" checkbox looks for non-existent DOM id.
April 16, 2009, 11:13:00 pm
Hi
we have made the changes in (trunk)  to show-hide the payment block information by checking the Billing Mode instead of checking the payment processor type

we ignore the show hide when

 BILLING_MODE_BUTTON = 2,
 BILLING_MODE_NOTIFY  = 4;

you can backport the patch from here: http://fisheye.civicrm.org/changelog/CiviCRM?cs=20701

HTH

Sunil
The community around a product more important than the product itself?

dbabbage

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Re: Javascript error in "Pay later" checkbox looks for non-existent DOM id.
April 17, 2009, 04:48:55 am
Thanks for all the help. In the meantime, I edited a template file to add the necessary ID to a td element which eliminated this error. Given this site goes live on Monday I think I'll stick with my interim solution but will separately investigate the above, including backporting that solution. :)

dbabbage

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Re: Javascript error in "Pay later" checkbox looks for non-existent DOM id.
April 17, 2009, 04:19:19 pm
Just a brief unrelated note, since Paymex has been mentioned above... I've discovered a bug in their payment module which means that the test_mode parameter isn't passed to their server even when you are in test mode, resulting in test mode transactions actually being billed if you use a real credit card. I've corrected the file and will upload a patch here shortly in case anyone is using Paymex (as well as sending it to them, of course).

dbabbage

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Re: Javascript error in "Pay later" checkbox looks for non-existent DOM id.
April 17, 2009, 04:41:09 pm
Patch below enables the Paymex CiviCRM payment module to correctly work when in test mode. Has been sent to Paymex.

Code: [Select]
--- /civicrm/CRM/Core/Payment/Paymex.php
+++ /civicrm/CRM/Core/Payment/Paymex.php
@@ -120,6 +120,11 @@ class CRM_Core_Payment_Paymex extends CR
                    'ex_invoice'         => $params['invoiceID'] ,
                    'amount'             => $params['amount']);
 
+        // include test_mode parameter if operating in test mode.
+        if ( $this->_mode == 'test' ) {
+            $paymexParams['test_mode'] = 1;
+        }
+
         // add name and address if available, CRM-3130
         $otherVars = array( 'first_name'     => 'first_name',
                             'last_name'      => 'last_name',


petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Javascript error in "Pay later" checkbox looks for non-existent DOM id.
June 13, 2009, 03:20:24 am
Hey - just wondering if you know if paymex have indicated any interest in having this contributed back to core?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Javascript error in "Pay later" checkbox looks for non-existent DOM id.
June 18, 2009, 10:14:26 pm
Seeing this same error using the PayFlow processor. Must be something antipodean ;)
@xurizaemon ● www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Javascript error in "Pay later" checkbox looks for non-existent DOM id.
June 30, 2009, 07:56:22 pm
Fixed in 2.2.6 release. http://fisheye.civicrm.org/changelog/CiviCRM?cs=20701
@xurizaemon ● www.fuzion.co.nz

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Javascript error in "Pay later" checkbox looks for non-existent DOM id.
August 05, 2009, 01:05:06 am
Hey Chris - this patch doesn't seem to work if pay later is enabled. It is only working if no pay later on the LSA site
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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Javascript error in "Pay later" checkbox looks for non-existent DOM id.
July 05, 2010, 12:33:51 am
Hi,

Paymex has some important news and you may need to start taking action now to reduce interruption to your business.

Regrettably, Paymex will no longer be accepting new customer accounts as of today, and will no longer process any credit card transactions from Friday 16th July 2010. Any balances in your Paymex account are safe and the Paymex system will continue to allow you to withdraw your funds up until Friday 23rd July 2010 when the system will be shut down.

Why is Paymex doing this?...

This decision has been predominantly based on two factors: expected processing volumes over the last few months have not been achieved and a substantial increase in resource cost for monitoring and dealing with suspicious and fraudulent transactions and account holders.

So, what do I need to do?...

You will need to make alternative arrangements for accepting credit card transactions if Paymex is your only transaction method. If you have other processing methods then you will need to remove Paymex as a payment option in your system.

Will I lose the money in my Paymex account?

No, your money is safe. You can withdraw it as per the usual withdrawal process up until Friday 23rd July 2010.

What happens if there is a chargeback after the site is gone?

You will continue to be responsible for any charge backs on your account up to 90 days after 16th July 2010. Paymex will continue to operate as per usual for dealing with charge backs and customer queries up until the end of October on the support@paymex.co.nzemail address.

Will Paymex help me transfer to another provider?

We will do all that we can at our standard rates to assist you in transferring to another provider, should you wish to discuss this with us please email support@paymex.co.nz.

Thank you all for using the Paymex system, we believe it has delivered a great service to a large number of New Zealanders.




Regards,




The Paymex Team

If you would like to unsubscribe
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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Javascript error in "Pay later" checkbox looks for non-existent DOM id.

This forum was archived on 2017-11-26.