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 CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail re-writes links on send and preview
Pages: [1]

Author Topic: CiviMail re-writes links on send and preview  (Read 737 times)

John Richardson

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 0
    • Life Challenge of Southeastern Michigan
  • CiviCRM version: 4.5.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.27
  • PHP version: 5.3.13
CiviMail re-writes links on send and preview
March 14, 2013, 01:10:48 pm
Hey all you friendly, helpful souls out there! I've got an issue I am struggling with. I am Using CiviCRM 4.2 on Drupal 7. Problem: all my links in CiviMail get re-written to an invalid address in my domain on send and preview. The links are correct in the source, I know they are right, but they always go to an invalid page in my domain, e.g. they go to http://[mysite]/sites/all/modules/civicrm/extern/url.php?u=24&qid=48 Anyone got any ideas? As I said, the source code is correct, but no matter what url I try, no matter how I get it into the editor (using the "link" icon for TinyMCE, CKEditor, etc. or hand coding in the source), when I send or preview the url always gets re-written to the absolute path above. Frustrated! Any thoughts on this anyone?
John Richardson

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: CiviMail re-writes links on send and preview
March 15, 2013, 03:48:46 am
Hi. Can you clarify if this is a more precise description of your situation:

You have CiviCRM 4.2 on Drupal 7 on a subdomain, let's say civi.ideaman.com

Then you have a public WordPress site on your main domain, ideaman.com

You are trying to send CiviMail with links to your main site, such as http://ideaman.com/somepage but they are getting rewritten at some point to be civi.ideaman.com/a.different.page

Furthermore, the a.different.page part of the new URL is actually the absolute location of url.php meaning the URL sent out in the email is like

http://civi.ideaman.com/home/ideaman/www/civi/sites/all/modules/civicrm/extern/url.php?u=13&qid=78

Is that correct? And that even trying to link to google.com gets rewritten into something like the above? I think it is correct and it's quite bizarre...

Now it's not actually bizarre that the link goes to civi.ideaman.com because that's actually correct--CiviCRM wants to record the fact that someone clicked the link and then forward them to google or ideaman.com or whatever. But the rest of the link is wrong and that's bizarre....
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: CiviMail re-writes links on send and preview
March 15, 2013, 04:34:43 am
Uncheck track clicks on the second page and it won't be rewritten

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: CiviMail re-writes links on send and preview
March 15, 2013, 05:08:07 am
That may help, but what if he wants to track clicks? The URL is wrong. :(
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

John Richardson

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 0
    • Life Challenge of Southeastern Michigan
  • CiviCRM version: 4.5.4
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.27
  • PHP version: 5.3.13
Re: CiviMail re-writes links on send and preview
March 15, 2013, 05:18:10 am
Thanks! It works when not tracking clicks. Hershel is right though, I would like to track clicks. I didn't realize that CiviCRM would re-write the url in order to do that. I see why. Hershel describes exactly the situation above. I have CiviCRM installed on a subdomain and typically want mail to interact with my main domain. But, in this case, for whatever reason, the re-write goes to an invalid url and doesn't get forwarded. So, is the problem that CiviCRM is installed on a subdomain? Is that why url goes crazy on re-write? Keep in mind that even if I try to link to an external page, outside of the server, like Google, the url goes whacky.
John Richardson

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail re-writes links on send and preview

This forum was archived on 2017-11-26.