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:
http://wpmaster.localhost:7979/civicrm/civicrm/payment/ipn/test/
Whereas in Drupal in returns the URL without the domain:
/civicrm/payment/ipn/test
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