0

I get an error with tracked urls in mailings. When the user clicks the link inside the mail, he gets a page telling him "error 500".

If error reporting is on in php, I get following error:

Fatal error: Call to undefined function drupal_add_http_header() in /home/www/<...>/sites/all/modules/civicrm/CRM/Utils/System/Drupal.php on line 790

The URL called is

http://<mydomain>/sites/all/modules/civicrm/extern/url.php?u=221&qid=1851

As workaround, I could solve the problem adding a call to loadBootStrap():

  public function setHttpHeader($name, $value) {
    self::loadBootStrap([], false);
    drupal_add_http_header($name, $value);
  }

But I belive this a very dirty thing to do! :-/

With this fix, all things works fine with the same url from above!

I'm using CiviCRM 4.7.Beta3 and Drupal core 7.41.

  • What version of CiviCRM are you using? – Allen Hutchison Dec 20 '15 at 6:32
  • When the user clicks on the link, what does the resulting web address look like? Might anything from this question help - civicrm.stackexchange.com/q/3569/105 ? – Allen Hutchison Dec 20 '15 at 6:36
  • I'm using CiviCRM 4.7.Beta3 and Drupal core 7.41. URLs are just right, but like mentioned in the post, I get this "undefinend function error"! The error from your link something different. – Tiggr Dec 20 '15 at 16:05
  • Please update your question to provide an example URL in reply to Allen's question above? – Chris Burgess Dec 20 '15 at 18:54
  • If edited the question! – Tiggr Dec 20 '15 at 19:29

Your Answer

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

Browse other questions tagged or ask your own question.