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) »
  • Old email links not working after domain change
Pages: [1]

Author Topic: Old email links not working after domain change  (Read 539 times)

LMKWeb

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.2.6
  • CMS version: Joomla 2.5.8
Old email links not working after domain change
December 30, 2013, 12:07:35 pm
We keep archived versions of old emails in the news section of the website. Following a recent domain name change (and server move), all of the old email links redirect to [Site URL]/administrator/components/com_civicrm/civicrm/extern/url.php?u=10503&qid=332063 or something similar, instead of the intended page. The links worked prior to the change, and all new links work that we created after the change. I'm assuming this has something to do with the way that CiviCRM stores the links in the database, and the fact that our site URL has changed. Is there an easy way to correct this, without having to go in and edit each link? There are probably upwards of 1000 links that this pertains to.

We're running CiviCRM 4.4 on Joomla 2.5.17. Thanks!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Old email links not working after domain change
December 31, 2013, 12:21:26 am

your best bet might be to run some sql commands to alter various data values to point to the new server

if you do it, would be good if you can write it as a standalone shell script with arguments so other folks can use it when they hit similar issues

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

LMKWeb

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.2.6
  • CMS version: Joomla 2.5.8
Re: Old email links not working after domain change
January 01, 2014, 09:53:08 pm
That's a bit beyond my capabilities, unfortunately!

However, I went back in and did a little more digging, and I'm wondering if the issue could be stemming from some cause other than our domain name change. I checked over a dozen emails, and about half had working links, while the other half all redirected to the site back-end. On hover, the links were all formatted the same with /administrator/components/com_civicrm/civicrm/extern/url.php?u=URLID&qid=QueueID.

I checked out the TrackableURLOpen.php file, and found this comment:
Code: [Select]
  /**
   * Track a click-through and return the URL to redirect.  If the numbers
   * don't match up, return the base url.
   *
   * @param int $queue_id     The Queue Event ID of the clicker
   * @param int $url_id       The ID of the trackable URL
   *
   * @return string $url      The redirection url, or base url on failure.
   * @access public
   * @static
   */

It seems to me that there is a problem with the URL, probably in the queue because I checked a handful of URL IDs in the database and those all matched up. However, instead of returning the base site URL, it returns the admin URL. Where would I need to make a change to prevent this? And is there any way to recover the queue event ID for those that seem to be broken?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Old email links not working after domain change
January 01, 2014, 10:29:50 pm

u'll need to check the contents of the url table and the queue table and debug from there

if i had to guess, the ones that done work were created before the site move and the ones that work after the site move

please post back your findings

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Old email links not working after domain change

This forum was archived on 2017-11-26.