I'm trying to understand why the JavaScript function CRM.url gives different results depending on CMS. Can anyone explain?

For example this code:

CRM.url('civicrm/payment/ipn/test', null, 'front')

In WordPress it returns the complete URL with the domain:


Whereas in Drupal in returns the URL without the domain:


This inconsistency feels wrong. Is it a bug in CiviCRM?

For context I'm looking at this issue: https://github.com/artfulrobot/uk.artfulrobot.civicrm.gocardless/issues/97


I believe the third parameter should be boolean not string, 1 or 0/ true or false


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.